public static SelectBoxItemArrayList OpenCsv(string fileName) { SelectBoxItemArrayList list = new SelectBoxItemArrayList(); string[] strArray = File.ReadAllLines(DataDirectory + fileName, Encoding.GetEncoding("UTF-8")); for (int i = 0; i < strArray.Length; i++) { string[] strArray2 = strArray[i].Split(new char[] { ';' }); if (!string.IsNullOrEmpty(strArray2[0])) { string[] strArray3 = strArray2[0].Split(new char[] { ',', '\t' }); list.Add(strArray3[1], strArray3[1], int.Parse(strArray3[0])); } } return(list); }
public static void LoadList() { Pokeabw1List = OpenCsv("poke_a_bw.csv"); Pokeabw2List = OpenCsv("poke_a_bw2.csv"); PokeabwmoveList = OpenCsv("poke_a_move_bw.csv"); }