次の方法で共有


ListView.ColumnHeaderCollection.RemoveAt メソッド

コレクション内の指定されたインデックスにある列ヘッダーを削除します。

Public Overridable Sub RemoveAt( _
   ByVal index As Integer _) Implements IList.RemoveAt
[C#]
public virtual void RemoveAt(intindex);
[C++]
public: virtual void RemoveAt(intindex);
[JScript]
public function RemoveAt(
   index : int);

パラメータ

  • index
    削除する列ヘッダーの、0 から始まるインデックス番号。

実装

IList.RemoveAt

例外

例外の種類 条件
ArgumentOutOfRangeException index パラメータの値が、0 未満または ListView.ColumnHeaderCollectionCount プロパティの値以上です。

解説

コレクションから列ヘッダーを削除すると、コレクション内の後続の列ヘッダーのインデックスが変わります。削除される列ヘッダーに関するすべての情報が削除されます。このメソッドを使用すると、削除する列ヘッダーのインデックスを指定して、コレクションから特定の列ヘッダーを削除できます。列ヘッダーのインデックスではなく、削除する列ヘッダーを指定するには、 Remove メソッドを使用します。コレクションからすべての列ヘッダーを削除するには、 Clear メソッドを使用します。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

ListView.ColumnHeaderCollection クラス | ListView.ColumnHeaderCollection メンバ | System.Windows.Forms 名前空間 | Remove | Clear