NullReferenceException on instantiated object?

前端 未结 4 462
无人及你
无人及你 2021-01-26 08:24

This is a segment of code from an app I\'ve inherited, a user got a Yellow screen of death:

Object reference not set to an instance of an object

4条回答
  •  清酒与你
    2021-01-26 08:51

    The NullReferenceException was actually thrown within a catch block so the stack trace couldn't display that line of code so instead it stopped at the caller.

    It was indeed one of the properties of the l_Monitor instance.

提交回复
热议问题