String handle in C#
- by Chelsea_cole
I don't understand the use of "get" and "set" command, how to add a list of the accounts using the code below and someone give me some example to fix the error? Thanks! :(
    public class Account
    {
        public string UserName
        {get rerurn textBox1.Test; // error
        set UserName = textBox1.Text;} // error
        public string Password { get; set; }
        public string RePassword { get; set; }
        public string Name { get; set; }
        public string bd { get; set; }
        public string dt { get; set; }
        public string dc { get; set; }
    }
    public class ListAcc
    {
        static void Data()
        {
            List<Account> UserList = new List<Account>();
        }
    }