<qhelp>

<overview>

If a variable is dereferenced, for example as the qualifier in a method call, and the variable may have a `null` value on some execution paths leading to the dereferencing, the dereferencing may result in a `NullReferenceException`.

</overview> <recommendation>

Ensure that the variable does not have a `null` value when it is dereferenced.

</recommendation> <example>

In the following example, the method `DoPrint()` dereferences its parameter `o` unconditionally, resulting in a `NullReferenceException` via the call `DoPrint(null)`.

In the revised example, the method `DoPrint()` guards the dereferencing with a `null` check.

</example> <references>

- Microsoft, NullReferenceException Class.
</references> </qhelp>