I am outputting the value of a boolean
in my ASP.NET MVC Framework view, and would like to have a lower case true
or false
, rather than the default of True
or False
.
I understand that I could just do this:
@this.Model.MyBool.ToString().ToLower()
Alternatively, I could create an extension method. But this defeats the purpose of:
@this.Model.MyBool
I have read the post Why does Boolean.ToString output "True" and not "true", but most of the answers are pretty old.
Are there any more modern ways to accomplish this?