I have a class "Address" that has the following check:
if(thisAddress == null)
thisAddress = new Address();
When the code is run I get "Index was outside the bounds of the array" on the first line. If I remove the IF statement I get the error on the second line.
The class comes from Linq to SQL, but I have extended it. This worked before, I'm not sure why it started happening all of a sudden. thisAddress is a private variable in a UserControl.
Any ideas?