【发布时间】:2016-12-06 11:07:08
【问题描述】:
当我启动程序时,Visual Studio 2015(我使用 WPF 和 C#)总是给我一个未处理的异常,类型为“System.FormatException”,发生在 mscorlib.dll 中。
string ascii = string.Empty;
for (int i = 0; i < dec.Length; i += 3)
{
ascii += Convert.ToChar(Convert.ToByte(dec.Substring(i, 3))); // The exception occurs here.
}
【问题讨论】:
标签: c# wpf exception-handling