Just two true

I noticed that

true.ToString()

Convert.ToString(true)

Both return "True" rather than "true". Seems wrong to me somehow.....



Answer this question

Just two true

  • ArtT

    They both return (well Convert.ToString, simply calls Boolean.ToString()), either Boolean.TrueString or Boolean.FalseString depending on the value.

    I imagine if it returned 'false' or 'true', the Visual Basic programmers would probably say the same thing. ;)

    Note, though, that Boolean.TryParse does a case-insensitive comparision, so it will correctly parse either version.



  • Just two true