c#分割
Hashtable h = new Hashtable();
ArrayList l = new ArrayList();
string[] lines = System.IO.File.ReadAllLines(@"C:\Users\尘梦\Desktop\root.txt", Encoding.Default);
int[] scores = new int[lines.Length];
int[] years = new int[lines.Length];
for (int i = 0; i < lines.Length; i++)
{
string rot = lines[i];
string[] rots = rot.Split('|');
scores[i] = Convert.ToInt32(rots[2]);
years[i] = Convert.ToInt32(rots[3]);
}
h.Add(years, scores);
l.AddRange(scores);
l.AddRange(years);