Is there any difference between narrow strings with "" and "?
For example, the difference between what is:
string s = "hello" + "/" + "world";
and
string s = "hello" + '/' + "world";
Thanks in advance.
Duplicate quotations include the attached literals, such as "foo"
, Strings are , while one-quoted literals, e.g. 'c'
, characters , in the context of the merge behavior, there will be no differences.
Nevertheless, it is important to remember that strings and characters are not interchangeable in all scenarios, and you can not have a single quoted string with the exception of multiple characters.
Comments
Post a Comment