Error string encoding (Windows 10 + Visual Studio 2015 + Net 4.6)
问题 My code: Keys = new Dictionary<string, string>(); Keys.Add("Набег_0", "raid_0"); When I get Keys.ElementAt(0) , I have this: {[Íàáåã_0, raid_0]} . Of course, when I run the program, key = "Набег_0" is not defined and the program crashes with a System.Collections.Generic.KeyNotFoundException This code worked fine when I had Windows 8.1 + Visual Studio 2013 + net 3.5 How do I fix this? 回答1: You somehow convinced the C# compiler that your source code was written in code page 1251, the default