看这样行不行,代码贴上来没格式。。
int[,] num=new int[100,100];
int tot = 0;
string[] nn = new string[100];
StreamReader ar = new StreamReader("e:\\data.txt");
string str;
str = ar.ReadLine();
while (str != null)
{
nn = str.Split(' ');
int mp=0;
foreach (string i in nn)
{
num[tot,mp++] = int.Parse(i);
}
tot++;
//操作
MessageBox.Show(str);
str = ar.ReadLine();
}
ar.Close();