CodeMemberField Constructor (String, String)

Initializes a new instance of the CodeMemberField class using the specified field type and field name.

Namespace:  System.CodeDom
Assembly:  System (in System.dll)

public CodeMemberField(
	string type,
	string name
)

Parameters

type
Type: System.String

The type of the field.

name
Type: System.String

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.

NoteNote

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft