Machinations

Machinations.Annotations.CanBeNullAttribute Class Reference

Indicates that the value of the marked element could be `null` sometimes, so the check for `null` is necessary before its usage. More...

Inheritance diagram for Machinations.Annotations.CanBeNullAttribute:

## Detailed Description

Indicates that the value of the marked element could be `null` sometimes, so the check for `null` is necessary before its usage.

[CanBeNull] object Test() => null;
void UseTest() {
var p = Test();
var s = p.ToString(); // Warning: Possible 'System.NullReferenceException'
}

The documentation for this class was generated from the following file:

- Properties/Annotations.cs