Today I came across a peculiarity of C # which I had never stopped to pay attention to:
When converting a value bool
to string
, the result is a text in camel case :
string verdadeiro = true.ToString(); //Converte para True
string falso = false.ToString(); //Converte para False
However, to use the literal values in the language, you have to write them in lowercase, write them in camel case causes compilation error:
bool verdadeiro = True; //Não compila
bool falso = False; //Não compila
What is the reason for this difference?