G
Guest
Hi Guys,
been puzzled with this error for few days now. In the try and catch block, i
am trying to set the label text property to property retrieved from exchange
database. The record has certain properties set and some are not. I keep on
getting error Object reference not set to an instance of an object...
here is my code
if(!indvContact.Surname.Equals(null))
{
surname.Text=indvContact.Surname.ToString();
}
I assumed that it will work however it dont. Is there any way in the catch
block, i can tell the code to move on to the next step ...or maybe another
approach to it..
Thanks
been puzzled with this error for few days now. In the try and catch block, i
am trying to set the label text property to property retrieved from exchange
database. The record has certain properties set and some are not. I keep on
getting error Object reference not set to an instance of an object...
here is my code
if(!indvContact.Surname.Equals(null))
{
surname.Text=indvContact.Surname.ToString();
}
I assumed that it will work however it dont. Is there any way in the catch
block, i can tell the code to move on to the next step ...or maybe another
approach to it..
Thanks