Post Locked by Bhargav Rao
Notice added Wiki Answer by Bhargav Rao
Cotent Edited
Source Link
Rajan Mishra
  • 1.2k
  • 2
  • 15
  • 28

I have some code and when it executes, it throws a NullReferenceException, saying:

Object reference not set to an instance of an object.

What does this mean, and what can I do about itto fix this error?

I have some code and when it executes, it throws a NullReferenceException, saying:

Object reference not set to an instance of an object.

What does this mean, and what can I do about it?

I have some code and when it executes, it throws a NullReferenceException, saying:

Object reference not set to an instance of an object.

What does this mean, and what can I do to fix this error?

edited title
Link
gurghet
  • 7.4k
  • 4
  • 35
  • 60

What is a NullReferenceException, and how do I fix it?

Rollback to Revision 22
Link
dbc
  • 89.6k
  • 18
  • 177
  • 280
edited tags
Link
user5613751
user5613751
Loading
Rollback to Revision 20
Source Link
CodeCaster
  • 138.4k
  • 19
  • 201
  • 250
Loading
improved readability
Source Link
alamin
  • 2.1k
  • 1
  • 23
  • 30
Loading
Post Made Community Wiki by ChrisF
added 2 characters in body
Source Link
BartoszKP
  • 33.1k
  • 13
  • 98
  • 126
Loading
edited tags
Link
LearnCocos2D
  • 64.1k
  • 20
  • 128
  • 214
Loading
edited tags; edited tags
Link
LearnCocos2D
  • 64.1k
  • 20
  • 128
  • 214
Loading
removing my earlier vandalism
Link
Lasse V. Karlsen
  • 363.8k
  • 96
  • 607
  • 796
Loading
added more information to the title since this seems to be favored in related questions when asking a new one
Link
Lasse V. Karlsen
  • 363.8k
  • 96
  • 607
  • 796
Loading
Rollback to Revision 13
Link
Ant P
  • 24.1k
  • 5
  • 65
  • 104
Loading
edited tags
Link
user2864740
  • 56.9k
  • 12
  • 127
  • 201
Loading
Grammatical pedantry
Source Link
Ant P
  • 24.1k
  • 5
  • 65
  • 104
Loading
Question Protected by ken2k
edited title
Link
Cole Tobin
  • 8.7k
  • 15
  • 44
  • 69
Loading
edited title
Link
Cody Gray
  • 229.4k
  • 49
  • 476
  • 554
Loading
deleted 136 characters in body
Source Link
Servy
  • 197k
  • 25
  • 316
  • 426
Loading
Rollback to Revision 7
Source Link
Mark Hurd
  • 10.4k
  • 10
  • 65
  • 99
Loading
deleted 136 characters in body
Source Link
Servy
  • 197k
  • 25
  • 316
  • 426
Loading
deleted 272 characters in body
Source Link
John Saunders
  • 158.9k
  • 25
  • 236
  • 392
Loading
deleted 2 characters in body
Source Link
Peter Olson
  • 129.5k
  • 47
  • 196
  • 237
Loading