Class NotNullWhenAttribute
- Namespace
- System.Diagnostics.CodeAnalysis
- Assembly
- nanoFramework.System.Runtime.dll
Specifies that when a method returns ReturnValue, the parameter will not be null even if the corresponding type allows it.
public sealed class NotNullWhenAttribute : Attribute
- Inheritance
-
NotNullWhenAttribute
- Inherited Members
- Extension Methods
Constructors
NotNullWhenAttribute(bool)
Initializes the attribute with the specified return value condition.
public NotNullWhenAttribute(bool returnValue)
Parameters
returnValue
boolThe return value condition. If the method returns this value, the associated parameter will not be null.
Properties
ReturnValue
Gets the return value condition.
public bool ReturnValue { get; }