I get “object referance not set to an instance….” error. I comment the line…
public Guid Login(string userName, string password) { Guid result = new Guid();if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password)) { userName = userName.Trim(); password = password.Trim(); Member member = BusinessDb.LoginDbJobs.GetUser(userName); if (member != null && member.PasswordDb == password) { result = Guid.NewGuid(); Members.Live.Add(result); //--->Object reference not set to an instance of an object. } } return result; }And Member class is;
... public class Members { public static List< Guid > Live; } ...So how can I add the "new Guid", to "List< string > Live" ?
Thanks...
I think you should use:
You declare
Livebut not initialize it, soLiveis null!!