0

I see strings declared with a ^, such as String^ value1 = L"This is a string.";
I see this in both Microsoft Edge and Chrome, but I cannot find a meaning for it.

1 Answers1

1

String^ value1 = L"This is a string."; is a programming language construct. And you haven't told us which language :(

But I'm guessing you probably mean C++/CLI, a Microsoft extension to C++.

The ^ symbol is an handle declarator. It means that the object referred to can be deleted by .Net's garbage collector.

The L attribute denotes a Unicode string. Specifically, a wchar_t, UTF-16 Unicode string literal.

paulsm4
  • 114,292
  • 17
  • 138
  • 190