Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exception - Object reference not set to an instance of an object

0 views
Skip to first unread message

Dhanesh Shah

unread,
Jan 24, 2003, 11:42:03 AM1/24/03
to

I am getting this exception "Object reference not set to an instance of an
object" off and on in my csharp app. This app does lot of file processing as
well as sends/receives SOAP messages.

This is probably a generic message for many error conditions.

Any tips / suggestions to overcome this type of exception?

Thanks in advance.


Jon Skeet

unread,
Jan 24, 2003, 11:45:19 AM1/24/03
to

It's almost always because you're trying to dereference a variable whose
value is null, e.g.:

string x = null;
Console.WriteLine (x.Length);

--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too

0 new messages