This documentation is archived and is not being maintained.

CreateArrayType Method

Visual Studio .NET 2003

Creates an array of specified type, and inserts it into the code in the correct location.

[Visual Basic .NET]
Public Function CreateArrayType( _
   Optional Rank As Int = 1 _
) As CodeTypeRef
[Visual Basic 6]
Function CreateArrayType( _
   Optional Rank As Int = 1 _
) As CodeTypeRef
[C++]
HRESULT __stdcall CreateArrayType(
   int Rank,
   /* [out, retval] */ CodeTypeRef** retVal
);
[C#]
CodeTypeRef CreateArrayType(
   int Rank
);
[JScript .NET]
public function CreateArrayType(
   Rank : int
) : CodeTypeRef

Parameters

Rank
Optional. Default value = 1. The number of dimensions in the type array.

Return Value

Returns a CodeTypeRef object.

Remarks

The returned CodeTypeRef object has a Kind property of vsCMTypeRefArray, and an ElementType that is a copy of the CodeTypeRef object upon which CreateArrayType was invoked. The Parent property will be Nothing because no CodeElement has a Type property that refers to the newly-created CodeTypeRef object.

See Also

Applies To: CodeTypeRef Object

Show: