To save and reload your list of User
objects to and from the settings file, you will need to make the class public and provide a default (parameter-less) constructor. (The default constructor can be private.)
public class User
{
private User() {}
public string name { get; set; }
public string username { get; set; }
public string password { get; set; }
public string email { get; set; }
public User(string name, string username, string password, string email)
{
this.name = name;
this.username = username;
this.password = password;
this.email = email;
}
}
Without the class being public, the data will not be written to the settings file.
Without the default parameter-less constructor, the data will not be read from the file again.