I keep hitting the same problem over and over again, and I did it again just now. I wrote a line of code:
int LAID = db.GetLAByLatLong(address.Latitude, address.Longitude);
...and Visual Studio in reports no problem with the line whatsoever.
But when I run the code it reports:
Object reference not set to an instance of an object
What am i doing wrong? How come Visual Studio seems to say the code is fine, but at runtime it reports an error? I seem to be doing this a lot and I would really love to understand what I am doing wrong so I can avoid it.