共用方式為


CodeTypeReferenceCollection.Insert(Int32, CodeTypeReference) 方法

定義

CodeTypeReference 插入集合中指定的索引處。

public:
 void Insert(int index, System::CodeDom::CodeTypeReference ^ value);
public void Insert (int index, System.CodeDom.CodeTypeReference value);
member this.Insert : int * System.CodeDom.CodeTypeReference -> unit
Public Sub Insert (index As Integer, value As CodeTypeReference)

參數

index
Int32

以零起始的索引,是應插入項目的位置。

value
CodeTypeReference

要插入的 CodeTypeReference

範例

// Inserts a CodeTypeReference at index 0 of the collection.
collection->Insert( 0, gcnew CodeTypeReference( bool::typeid ) );
// Inserts a CodeTypeReference at index 0 of the collection.
collection.Insert( 0, new CodeTypeReference(typeof(bool)) );
' Inserts a CodeTypeReference at index 0 of the collection.
collection.Insert(0, New CodeTypeReference(GetType(Boolean)))

適用於

另請參閱