Home > OS >  Is there a way to change character sets for C# projects in Visual Studio 2019?
Is there a way to change character sets for C# projects in Visual Studio 2019?

Time:10-18

I know that character sets can be changed in C projects (Unicode, Multi-Byte, etc.) , but are there any options to set character sets in c# projects?

CodePudding user response:

All string objects in .NET are UTF-16. If you are interacting with native code via P/Invoke, there is a CharSet field on the DllImportAttribute which controls how .NET strings are converted when passed to / from native code.

  • Related