I currently have the following class with getters and setters as such
public class CustAccount { public string Account { get; set; } private string account; public string AccountType { get; set; } private string accountType; public CustSTIOrder(Account ord) { account = ord.Account; accountType = ord.AccountType; } } Now I realize that with public string Account { get; set; } I do not need to declare private string account . Anyways now my private variable account contains the value but when I use Account to obtain the value I get a null. Any suggestions on why I am getting a null ?
//end methodat the end of the class definition.Accountproperty and theaccountvariable are unrelated.accountto the methodAccountall by itself. If you do want to use these names, write thegetandsetroutines out in full.