I have the following classes:
public class CustomerResult
{
public string CompanyStatus { get; set; }
public OverallResult Result { get; set; }
}
public class OverallResult
{
public string StatusDescription { get; set; }
public int StatusCode { get; set; }
public string CustomerId { get; set; }
}
I instantiate:
var apiResult = new CustomerResult();
Why does the following return a null reference? Surely OverallResult is instantiated when I create CustomerResult()?
apiResult.Result.CustomerId = "12345";