private static void SetUserData(string usr, string pwd) { UserData = new clsUserData(); UserData.EmailAddress = usr; UserData.Password = new SecureString(); for (Int16 i = 0; i < pwd.Length; i++) { UserData.Password.AppendChar(Convert.ToChar(pwd.Substring(i, 1))); } UserData.Password.MakeReadOnly(); }
private static void GetUserDataFromConsole() { UserData = new clsUserData(); Console.Write("Enter email address: "); UserData.EmailAddress = Console.ReadLine(); UserData.Password = new SecureString(); Console.Write("Enter password: "******"*"); } } Console.WriteLine(); UserData.Password.MakeReadOnly(); }