【发布时间】:2015-05-01 17:02:46
【问题描述】:
我在 C# 中处理涉及数组的数据,当我使用 foreach 循环时它给了我一条消息
无法将 char 类型转换为字符串
int[,] tel = new int[4, 8];
tel[0, 0] = 398;
tel[0, 1] = 3333;
tel[0, 2] = 2883;
tel[0, 3] = 17698;
tel[1, 0] = 1762;
tel[1, 1] = 176925;
tel[1, 2] = 398722;
tel[2, 0] = 38870;
tel[3, 1] = 30439;
foreach (string t in tel.ToString())
{
Console.WriteLine(tel +" " +"is calling");
Console.ReadKey();
}
【问题讨论】: