ToolboxItemCollection.Item[Int32] 属性

定义

获取位于指定索引处的 ToolboxItem

public:
 property System::Drawing::Design::ToolboxItem ^ default[int] { System::Drawing::Design::ToolboxItem ^ get(int index); };
public System.Drawing.Design.ToolboxItem this[int index] { get; }
member this.Item(int) : System.Drawing.Design.ToolboxItem
Default Public ReadOnly Property Item(index As Integer) As ToolboxItem

参数

index
Int32

要获取或设置的对象的索引。

属性值

集合中每个有效索引处的 ToolboxItem

示例

下面的代码示例演示如何使用 的 ToolboxItemCollection索引器。

// Get the ToolboxItem at each index.
ToolboxItem^ item = nullptr;
for ( int index = 0; index < collection->Count; index++ )
   item = collection[ index ];
// Get the ToolboxItem at each index.
ToolboxItem item = null;
for( int index = 0; index<collection.Count; index++ )
    item = collection[index];
' Get the ToolboxItem at each index.
Dim item As ToolboxItem = Nothing
Dim index As Integer
For index = 0 To collection.Count - 1
    item = collection(index)
Next index

适用于