我的代码:
Keys = new Dictionary<string, string>();
Keys.Add("?????_0", "raid_0");
Run Code Online (Sandbox Code Playgroud)
当我得到时Keys.ElementAt(0),我有这个:{[Íàáåã_0, raid_0]}.当然,当我运行程序时,key = "?????_0"没有定义,程序崩溃了System.Collections.Generic.KeyNotFoundException
当我使用Windows 8.1 + Visual Studio 2013 + net 3.5时,此代码工作正常
我该如何解决?
c# dictionary character-encoding visual-studio-2015 .net-4.6