我记得在 C++ 中使用 Unicode 字符串是这样的:
std::wstring str = _T("a string here");
C# 中的等价物是什么?
最佳答案
C# 中的等价物是 String
类。
根据 MSDN :
(A String) Represents text as a series of Unicode characters.
[...] Each code point is encoded using UTF-16 encoding
所以,如果你执行 string str = "a string here";
,你就有了一个 Unicode 字符串。
关于c# - C#中的Unicode字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13277958/