MemberNotNullWhenAttribute Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
MemberNotNullWhenAttribute(Boolean, String) |
Initializes the attribute with the specified return value condition and a field or property member. |
MemberNotNullWhenAttribute(Boolean, String[]) |
Initializes the attribute with the specified return value condition and list of field and property members. |
- Source:
- NullableAttributes.cs
- Source:
- NullableAttributes.cs
- Source:
- NullableAttributes.cs
Initializes the attribute with the specified return value condition and a field or property member.
public:
MemberNotNullWhenAttribute(bool returnValue, System::String ^ member);
public MemberNotNullWhenAttribute(bool returnValue, string member);
new System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute : bool * string -> System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute
Public Sub New (returnValue As Boolean, member As String)
Parameters
- returnValue
- Boolean
The return value condition. If the method returns this value, the associated parameter will not be null
.
- member
- String
The field or property member that is promised to be non-null.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
- Source:
- NullableAttributes.cs
- Source:
- NullableAttributes.cs
- Source:
- NullableAttributes.cs
Initializes the attribute with the specified return value condition and list of field and property members.
public:
MemberNotNullWhenAttribute(bool returnValue, ... cli::array <System::String ^> ^ members);
public MemberNotNullWhenAttribute(bool returnValue, params string[] members);
new System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute : bool * string[] -> System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute
Public Sub New (returnValue As Boolean, ParamArray members As String())
Parameters
- returnValue
- Boolean
The return value condition. If the method returns this value, the associated parameter will not be null
.
- members
- String[]
The list of field and property members that are promised to be non-null.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: