Think about it for a second. This is a NullReferenceException. This means that you are trying to call a method or access a property of a NULL REFERENCE object. This means that the reference to the object you are trying to access is EMPTY, null. He does not exist.
What you are trying to find does not really exist.
Typically, a debugger is used to track a null reference to an object. Just set a breakpoint on the line that throws the exception, and check all the variables to see which one is zero.
The debugger is your best tool.
source share