ListView.ColumnHeaderCollection.Item[] 屬性

定義

從集合中取得資料行行首。

多載

Item[Int32]

取得集合中位於指定索引處的資料行行首。

Item[String]

從集合中取得具有指定索引鍵的資料行行首。

Item[Int32]

取得集合中位於指定索引處的資料行行首。

public:
 virtual property System::Windows::Forms::ColumnHeader ^ default[int] { System::Windows::Forms::ColumnHeader ^ get(int index); };
public virtual System.Windows.Forms.ColumnHeader this[int index] { get; }
member this.Item(int) : System.Windows.Forms.ColumnHeader
Default Public Overridable ReadOnly Property Item(index As Integer) As ColumnHeader

參數

index
Int32

要從集合中擷取之資料行行首的索引。

屬性值

ColumnHeader,表示集合中、位於指定索引處的資料行行首。

例外狀況

index 小於 0,或大於等於 CountListView.ColumnHeaderCollection 屬性值。

備註

您可以使用這個方法來取得 ColumnHeader 儲存在集合中特定位置的 。 若要判斷集合中特定資料行標頭的索引,請使用 IndexOf 方法。

另請參閱

適用於

Item[String]

從集合中取得具有指定索引鍵的資料行行首。

public:
 virtual property System::Windows::Forms::ColumnHeader ^ default[System::String ^] { System::Windows::Forms::ColumnHeader ^ get(System::String ^ key); };
public virtual System.Windows.Forms.ColumnHeader this[string key] { get; }
member this.Item(string) : System.Windows.Forms.ColumnHeader
Default Public Overridable ReadOnly Property Item(key As String) As ColumnHeader

參數

key
String

要從集合中擷取之資料行行首的名稱。

屬性值

具有指定金鑰的 ColumnHeader

備註

索引鍵比較不區分大小寫。 如果 為 keynull 或空字串,則 Item[]null 回 。

適用於