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.
Asked
Active
Viewed 31 times
0

Don Ford
- 1
-
1Noting where you see this would be helpful. – Sam Axe Oct 29 '19 at 23:42
1 Answers
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