Why is NullReferenceException not giving the name of the identifier?

This happens to me all the time. I have code that breaks at runtime with NullReferenceException

:

I am being told the original file and line number, but not the actual location of the attempted link to what turned out to be null, in which case I cannot tell if it is _request

or Banker

.

What is the main reason why such valuable information has been omitted?

+3
c # .net runtime-error


source to share


No one has answered this question yet

See similar questions:

61
Why does the NullReferenceException contain information about what is null?

or similar:

1877
What is a NullReferenceException and how do I fix it?
1743
What's the best way to give a C # auto property an initial value?
1327
Why is it important to override GetHashCode when the Equals method is overridden?
1270
Why not inherit from List <T>?
1109
Why is Dictionary preferred over Hashtable?
677
Determine if a string is a number
21
Why would typeof (Foo) ever return null?
eleven
Why can't I throw an exception with a null-reference object that has a null reference?
0
custom iTunesMobileDevice.dll implementation throws NullReferenceException
0
Unhelpful exceptions (NullReferenceException, KeyNotFoundException)



All Articles
Loading...
X
Show
Funny
Dev
Pics