I got an error report, where the top of the stack trace was similar to:
System.NullReferenceException: <...> at MyApplication.MyType.SomeMethod(String arg) in MyType.cs:line 0
The point is, that the line number is 0. What could cause such stack-trace behavior?
According to this question, it could be due to inlining. Have you got optimisations switched on?