回复 2楼 yhlvht
FileStream filest = new FileStream(@"C:\Documents and Settings\Administrator\桌面\123.txt", FileMode.Open, FileAccess.ReadWrite);
StreamReader sr = new StreamReader(filest);
string strLine = sr.ReadLine();
strLine = strLine.Trim();
string[] str = strLine.Split(' ');
float[] array = float.Parse(str);
while (strLine != null)
{
Console.WriteLine(array);
strLine = sr.ReadLine();
}
sr.Close();
filest.Close();
Console.ReadLine();
我的目的是想把读取出来的字符形式的数组,存储到float的数组中