public List <PhoneBook> readFile(string file) { using (FileStream fs = new FileStream(file, FileMode.OpenOrCreate)) { StreamReader sr = new StreamReader(file, System.Text.Encoding.Default); string line; line = sr.ReadToEnd(); string[] array = line.Split('\n'); PhoneBook pb = new PhoneBook(); foreach (var item in array) { } } return(null); }
static void Main(string[] args) { PhoneBook ph = new PhoneBook(); List <PhoneBook> list ph.readFile(@""); }