I am retrieving some data form a table using linq. I am pulling that info into text boxes I have on a form. But because some of the fields may be null and there is no way to know which ones will be null at any given time, thus I keep getting a NullReferenceException or an Object reference not set to an instance of an object error. I have tried everything to try to test the field to see if it is null but nothing has work.
are you using VS2015 and targeting one of the last Framework? If yes, you might want to try the Elvis operator: https://msdn.microsoft.com/en-us/library/dn986595.aspx