public static CityTree LoadCitiesList() { CityTree cities = new CityTree(); string filename = @"..\..\..\world-cities.csv"; string[] linesInFile = File.ReadAllLines(filename); string[] CityNames = new string[0]; for (int i = 0; i < linesInFile.Length; i++) { string currentLine1 = linesInFile[i]; CityNames = currentLine1.Split(','); cities.Insert(CityNames[0]); } return(cities); }
public CityFinderImplementation() { Cities = LoadCitiesList(); }