MaybeNullWhenAttribute(Boolean) 构造函数

定义

使用指定的返回值条件初始化属性。Initializes the attribute with the specified return value condition.

public:
 MaybeNullWhenAttribute(bool returnValue);
public MaybeNullWhenAttribute (bool returnValue);
new System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute : bool -> System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute
Public Sub New (returnValue As Boolean)

参数

returnValue
Boolean

返回值条件。The return value condition. 如果方法返回此值,则关联的参数可能为 nullIf the method returns this value, the associated parameter may be null.

适用于