Szerkesztés

Megosztás a következőn keresztül:


CodeTypeReference Constructors

Definition

Initializes a new instance of the CodeTypeReference class using the specified type.

Overloads

CodeTypeReference()

Initializes a new instance of the CodeTypeReference class.

CodeTypeReference(CodeTypeParameter)

Initializes a new instance of the CodeTypeReference class using the specified code type parameter.

CodeTypeReference(String)

Initializes a new instance of the CodeTypeReference class using the specified type name.

CodeTypeReference(Type)

Initializes a new instance of the CodeTypeReference class using the specified type.

CodeTypeReference(CodeTypeReference, Int32)

Initializes a new instance of the CodeTypeReference class using the specified array type and rank.

CodeTypeReference(String, CodeTypeReference[])

Initializes a new instance of the CodeTypeReference class using the specified type name and type arguments.

CodeTypeReference(String, CodeTypeReferenceOptions)

Initializes a new instance of the CodeTypeReference class using the specified type name and code type reference option.

CodeTypeReference(String, Int32)

Initializes a new instance of the CodeTypeReference class using the specified array type name and rank.

CodeTypeReference(Type, CodeTypeReferenceOptions)

Initializes a new instance of the CodeTypeReference class using the specified type and code type reference.

CodeTypeReference()

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class.

public:
 CodeTypeReference();
public CodeTypeReference ();
Public Sub New ()

Remarks

This constructor creates an empty CodeTypeReference object. If you use this constructor, set properties to establish the type reference.

Applies to

CodeTypeReference(CodeTypeParameter)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified code type parameter.

public:
 CodeTypeReference(System::CodeDom::CodeTypeParameter ^ typeParameter);
public CodeTypeReference (System.CodeDom.CodeTypeParameter typeParameter);
new System.CodeDom.CodeTypeReference : System.CodeDom.CodeTypeParameter -> System.CodeDom.CodeTypeReference
Public Sub New (typeParameter As CodeTypeParameter)

Parameters

typeParameter
CodeTypeParameter

A CodeTypeParameter that represents the type of the type parameter.

Applies to

CodeTypeReference(String)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified type name.

public:
 CodeTypeReference(System::String ^ typeName);
public CodeTypeReference (string? typeName);
public CodeTypeReference (string typeName);
new System.CodeDom.CodeTypeReference : string -> System.CodeDom.CodeTypeReference
Public Sub New (typeName As String)

Parameters

typeName
String

The name of the type to reference.

Remarks

If the typeName parameter references a generic type, it must follow the syntax conventions for generic types. For example, the reflection signature for a Dictionary<TKey,TValue> type, where K is a string and V is a List<T> of integers, is represented by reflection as the following (with the assembly information removed): System.Collections.Generic.Dictionary`2[[System.String], [System.Collections.Generic.List`1[[System.Int32]]]].

Note

You must use square brackets ([]) and not the C# angle brackets (<>) to delimit generic parameters.

To avoid the possibility of making a mistake in specifying the syntax, consider using the constructor that takes a type as a parameter instead of a string.

Applies to

CodeTypeReference(Type)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified type.

public:
 CodeTypeReference(Type ^ type);
public CodeTypeReference (Type type);
new System.CodeDom.CodeTypeReference : Type -> System.CodeDom.CodeTypeReference
Public Sub New (type As Type)

Parameters

type
Type

The Type to reference.

Exceptions

type is null.

Applies to

CodeTypeReference(CodeTypeReference, Int32)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified array type and rank.

public:
 CodeTypeReference(System::CodeDom::CodeTypeReference ^ arrayType, int rank);
public CodeTypeReference (System.CodeDom.CodeTypeReference arrayType, int rank);
new System.CodeDom.CodeTypeReference : System.CodeDom.CodeTypeReference * int -> System.CodeDom.CodeTypeReference
Public Sub New (arrayType As CodeTypeReference, rank As Integer)

Parameters

arrayType
CodeTypeReference

A CodeTypeReference that indicates the type of the array.

rank
Int32

The number of dimensions in the array.

Remarks

This constructor can be used to construct arrays of arrays by nesting CodeTypeReference objects.

Applies to

CodeTypeReference(String, CodeTypeReference[])

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified type name and type arguments.

public:
 CodeTypeReference(System::String ^ typeName, ... cli::array <System::CodeDom::CodeTypeReference ^> ^ typeArguments);
public CodeTypeReference (string typeName, params System.CodeDom.CodeTypeReference[] typeArguments);
new System.CodeDom.CodeTypeReference : string * System.CodeDom.CodeTypeReference[] -> System.CodeDom.CodeTypeReference
Public Sub New (typeName As String, ParamArray typeArguments As CodeTypeReference())

Parameters

typeName
String

The name of the type to reference.

typeArguments
CodeTypeReference[]

An array of CodeTypeReference values.

Applies to

CodeTypeReference(String, CodeTypeReferenceOptions)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified type name and code type reference option.

public:
 CodeTypeReference(System::String ^ typeName, System::CodeDom::CodeTypeReferenceOptions codeTypeReferenceOption);
public CodeTypeReference (string? typeName, System.CodeDom.CodeTypeReferenceOptions codeTypeReferenceOption);
public CodeTypeReference (string typeName, System.CodeDom.CodeTypeReferenceOptions codeTypeReferenceOption);
new System.CodeDom.CodeTypeReference : string * System.CodeDom.CodeTypeReferenceOptions -> System.CodeDom.CodeTypeReference
Public Sub New (typeName As String, codeTypeReferenceOption As CodeTypeReferenceOptions)

Parameters

typeName
String

The name of the type to reference.

codeTypeReferenceOption
CodeTypeReferenceOptions

The code type reference option, one of the CodeTypeReferenceOptions values.

Applies to

CodeTypeReference(String, Int32)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified array type name and rank.

public:
 CodeTypeReference(System::String ^ baseType, int rank);
public CodeTypeReference (string baseType, int rank);
new System.CodeDom.CodeTypeReference : string * int -> System.CodeDom.CodeTypeReference
Public Sub New (baseType As String, rank As Integer)

Parameters

baseType
String

The name of the type of the elements of the array.

rank
Int32

The number of dimensions of the array.

Applies to

CodeTypeReference(Type, CodeTypeReferenceOptions)

Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs
Source:
CodeTypeReference.cs

Initializes a new instance of the CodeTypeReference class using the specified type and code type reference.

public:
 CodeTypeReference(Type ^ type, System::CodeDom::CodeTypeReferenceOptions codeTypeReferenceOption);
public CodeTypeReference (Type type, System.CodeDom.CodeTypeReferenceOptions codeTypeReferenceOption);
new System.CodeDom.CodeTypeReference : Type * System.CodeDom.CodeTypeReferenceOptions -> System.CodeDom.CodeTypeReference
Public Sub New (type As Type, codeTypeReferenceOption As CodeTypeReferenceOptions)

Parameters

type
Type

The Type to reference.

codeTypeReferenceOption
CodeTypeReferenceOptions

The code type reference option, one of the CodeTypeReferenceOptions values.

Applies to