Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Initializes a new instance of the CodeMemberField class.
CodeMemberField() |
Initializes a new instance of the CodeMemberField class. |
CodeMemberField(CodeTypeReference, String) |
Initializes a new instance of the CodeMemberField class using the specified field type and field name. |
CodeMemberField(String, String) |
Initializes a new instance of the CodeMemberField class using the specified field type and field name. |
CodeMemberField(Type, String) |
Initializes a new instance of the CodeMemberField class using the specified field type and field name. |
Initializes a new instance of the CodeMemberField class.
public:
CodeMemberField();
public CodeMemberField();
Public Sub New ()
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
Initializes a new instance of the CodeMemberField class using the specified field type and field name.
public:
CodeMemberField(System::CodeDom::CodeTypeReference ^ type, System::String ^ name);
public CodeMemberField(System.CodeDom.CodeTypeReference type, string name);
new System.CodeDom.CodeMemberField : System.CodeDom.CodeTypeReference * string -> System.CodeDom.CodeMemberField
Public Sub New (type As CodeTypeReference, name As String)
An object that indicates the type of the field.
The name of the field.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
Initializes a new instance of the CodeMemberField class using the specified field type and field name.
public:
CodeMemberField(System::String ^ type, System::String ^ name);
public CodeMemberField(string type, string name);
new System.CodeDom.CodeMemberField : string * string -> System.CodeDom.CodeMemberField
Public Sub New (type As String, name As String)
The type of the field.
The name of the field.
If the type
parameter references a generic type, it must follow the syntax conventions for generic types. Generic types are formatted as follows: the name of the type, followed by a grave accent ("`"), followed by a count of the generic type arguments, followed by the parameters delimited with brackets.
Note
You must use square brackets ([]) and not the C# angle brackets (<>) to delimit generic parameters.
To avoid the possibility of making a syntactic mistake, consider using the CodeMemberField(Type, String) constructor that takes a type instead of a string as a parameter.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
Initializes a new instance of the CodeMemberField class using the specified field type and field name.
public:
CodeMemberField(Type ^ type, System::String ^ name);
public CodeMemberField(Type type, string name);
new System.CodeDom.CodeMemberField : Type * string -> System.CodeDom.CodeMemberField
Public Sub New (type As Type, name As String)
The type of the field.
The name of the field.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in