iServe.Models.User.User C# (CSharp) Method

User() public method

public User ( string delimitedString ) : System
delimitedString string
return System
        public User(string delimitedString)
        {
            string[] input = delimitedString.Split('~');

            if (input.Length < 5) {
                // log an error
                throw new Exception("Invalid User delimited string sent to User constructor.");
            }
            else {
                ID = Convert.ToInt32(input[0]);
                ChurchID = Convert.ToInt32(input[1]);
                Name = input[2];
                Email = input[3];
                Rating = Convert.ToInt32(input[4]);
            }
        }