N
news.chi.sbcglobal.net
I have a question about string literals with C++/CLI.
Is there a difference between the following two lines?
String ^s1 = gcnew String("Hello");
String ^s2 = gcnew String(L"Hello");
I have been playing around with the compiler options for "Character Set" and
"Common Language Runtime Support" and those two lines compile fine. I am
thinking that when compiling with /clr, "Hello" is a string of Unicode
characters and the L prefix is no longer needed. Am I wrong about that?
Is there a difference between the following two lines?
String ^s1 = gcnew String("Hello");
String ^s2 = gcnew String(L"Hello");
I have been playing around with the compiler options for "Character Set" and
"Common Language Runtime Support" and those two lines compile fine. I am
thinking that when compiling with /clr, "Hello" is a string of Unicode
characters and the L prefix is no longer needed. Am I wrong about that?