What is the difference between Console.Write ('H') and Console.Write ('H') in C #?
One uses string overloading (the string "H" ), which uses char overloading (char 'H' char 'H' ). Both output the H character to the stream defined in Console.Out without adding a new line.
string
"H"
char
'H'
H
Console.Out
'H' is one character ( char ), while "H" can have more than one character ( string ).
The difference is that in the first call you pass the string , and in the second call you pass the char . Practically speaking, these two calls are equivalent.