error

  • Thread starter Thread starter Hrvoje Voda
  • Start date Start date
H

Hrvoje Voda

Object reference not set to an instance of an object.

What does it mean?

Hrvoje
 
You're trying to use an object variable to which a value has not been
assigned, or the value is null:

To duplicate it, do this:
object a;
Console.WriteLine(a.ToString());

the same with
object a = null;
Console.WriteLine(a.ToString());

This can also happen if you assign a value to an object variable from
another object variable that has a null value:
object a = null;
object b = a;
Console.WriteLine(b.ToString());

Does this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top