I am developing an Address Book using C#.
i have a list which is displayed in an DataGridView but I want to save the list and not the datagridview into a text file.
When the form loads i have the code:
string[] parts = line.Split(','); // the word line throws an error saying that it does not exist in the current context
Person p = new Person(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6]);
AddressBook.Persons.Add(p);
I then have this code in the datalayer to save the list:
string filePath = @"c:\test.txt";
p.ToString(); // it does not recognise p
Can anyone help?