MaybeNullWhenAttribute
Specifies that when a method returns ReturnValue, the parameter may be null even if the corresponding type disallows it.
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
internal sealed class MaybeNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public MaybeNullWhenAttribute(bool returnValue)
{
ReturnValue = returnValue;
}
}
}