What's the different between Console.Write("H") and Console.Write('H') in C#?
One uses a string
overload (the string "H"
), one uses a char
overload (the char 'H'
). Both output the character H
to the stream defined in Console.Out
without adding a newline.
The difference is that in the first call, you're passing a string
and in the second call, you're passing a char
. Practically speaking, those two calls are equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With