ListView.ColumnHeaderCollection.Item[] Свойство
Определение
Получает заголовок столбца из коллекции.Gets a column header from the collection.
Перегрузки
Item[Int32] |
Получает заголовок столбца из коллекции по указанному индексу.Gets the column header at the specified index within the collection. |
Item[String] |
Получает заголовок столбца с указанным ключом из коллекции.Gets the column header with the specified key from the collection. |
Item[Int32]
Получает заголовок столбца из коллекции по указанному индексу.Gets the column header at the specified index within the collection.
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
Индекс заголовка столбца для извлечения из коллекции.The index of the column header to retrieve from the collection.
Значение свойства
ColumnHeader, представляющий заголовок столбца, расположенный в коллекции по указанному индексу.A ColumnHeader representing the column header located at the specified index within the collection.
Исключения
Значение параметра index
меньше 0 либо больше или равно значению свойства Count коллекции ListView.ColumnHeaderCollection.index
is less than 0 or greater than or equal to the value of the Count property of the ListView.ColumnHeaderCollection.
Комментарии
Этот метод можно использовать для получения ColumnHeader хранимого в определенном месте в коллекции.You can use this method to obtain the ColumnHeader stored at a specific location in the collection. Чтобы определить индекс определенного заголовка столбца в коллекции, используйте IndexOf метод.To determine the index of a specific column header in the collection, use the IndexOf method.
См. также раздел
Применяется к
Item[String]
Получает заголовок столбца с указанным ключом из коллекции.Gets the column header with the specified key from the collection.
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
Имя заголовка столбца для извлечения из коллекции.The name of the column header to retrieve from the collection.
Значение свойства
Объект ColumnHeader с указанным ключом.The ColumnHeader with the specified key.
Комментарии
При сравнении ключей регистр символов не учитывается.The key comparison is not case-sensitive. Если key
имеет значение null
или является пустой строкой, Item[] возвращает null
.If key
is null
or an empty string, Item[] returns null
.