0
Csharp # why char is using single quotes and string use 2?
Csharp # why char is using single quotes and string use 2? can any one explain ., and what is bool double
2 Réponses
+ 1
string types are quotation marks to indicate more than one character, char is an apostrophe to indicate one character, to make code more readable.
As far as I know, bool double really shouldn't be a thing, (false.53) just doesn't seem right
0
https://www.reddit.com/r/csharp/comments/ta4270/why_char_must_be_using_single_quotation_mark/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button provides some answers. Summarily, it's the simplest way to inform the compiler, and it's basically an integer under-the-hood.