读取文件问题
我是个初学者,看了段读取文件的代码,不太懂,请大神指点,下面的源代码有两个地方有问题static void GetData()
{
StreamReader reader = new StreamReader(Environment.CurrentDirectory + "//观测值表.txt", Encoding.UTF8);
string now_line;
while(true)
{
now_line = reader.ReadLine();
if (now_line != null)
{
if (now_line[0] == '控')
{
char[] sep = { '(', ',', ')', ':', ':' };//请问这里表示什么意思
string[] data = now_line.Split(sep);//还有这里表示什么意思
int num = (data.Length - 2) / 4;
for (int i = 0; i < num; i++)
{
Point nx = new Point();
nx.Id = int.Parse(data[1 + 4 * i]);
nx.Type = Point.PointTypes.起算点;
nx.X = double.Parse(data[3 + 4 * i]);
nx.Y = double.Parse(data[4 + 4 * i]);
nx.X0 = nx.X;
nx.Y0 = nx.Y;
KnownPoints.Add(nx);
StartPoints.Add(nx);
AllPoint.Add(nx);
}
break;
}
}
}