У меня есть продавец класса в следующем формате:
class salesman
{
public string name, address, email;
public int sales;
}
У меня есть еще один класс, в котором пользователь вводит имя, адрес, адрес электронной почты и продажи. Этот ввод затем добавляется в список
List<salesman> salesmanList = new List<salesman>();
После того, как пользователь вводит столько продавцов в список, сколько им нравится, у них есть возможность сохранить список в файл по своему выбору (который я могу ограничить .xml или .txt(что когда-либо более подходит)). Как добавить этот список в файл? Также этот файл необходимо перечитать обратно в список, если пользователь хочет позже просмотреть записи.