Jawad
❔ System.NullReferenceException: 'Object reference not set to an instance of an object.'
Need some help please with this exception
try
{
EntityCollection collection = service.RetrieveMultiple(new FetchExpression(query));
foreach (Entity contact in collection.Entities)
{
Console.WriteLine(contact.Attributes["fullname"].ToString());
}
}
catch (NullReferenceException e)
{
//eventListener.HandleEvent(Severity.Informational, line.GetType().Name, String.Format("Could not find the customer corresponding to the taxId '{0}' Applicant address will not be imported.", new TaxId(line.TaxId).Masked));
//eventListener.HandleEvent(Severity.Informational, line.GetType().Name, e.Message);
Console.WriteLine(e.Message);
}
12 replies