public void main() { OpenFile of = new OpenFile(); if (of.file_open) { //Succeed StreamReader sr = new StreamReader(of.new_file); group_limit = sr.ReadLine(); point_word = sr.ReadLine(); point_per_word = match(point_word);//得到每个单词的分数 while ((line = sr.ReadLine()) != null) { score.Add(match(line)); } //NewFile nf = new NewFile(); } }
public void main() { OpenFile of = new OpenFile(); if (of.file_open) { //Succeed path = of.new_file; StreamReader new_sr = new StreamReader(of.new_file); char[] separator = { ',' }; new_first = new_sr.ReadLine().Split(separator); level = new_first[0]; word_num = new_first[1]; rows = Convert.ToInt16(new_first[2]); cols = Convert.ToInt16(new_first[3]); word_list = new_sr.ReadLine().Split(separator); word_list_copy = (string[])word_list.Clone(); word = new List <string>(word_list_copy); word = word.OrderByDescending(word_child => word_child.Length).ToList(); } }