StatusBar.StatusBarPanelCollection.IndexOfKey(String) Метод
Определение
Возвращает индекс первого вхождения панели StatusBarPanel с указанным ключом.Returns the index of the first occurrence of a StatusBarPanel with the specified key.
public:
virtual int IndexOfKey(System::String ^ key);
public virtual int IndexOfKey (string key);
abstract member IndexOfKey : string -> int
override this.IndexOfKey : string -> int
Public Overridable Function IndexOfKey (key As String) As Integer
Параметры
- key
- String
Имя панели StatusBarPanel, которую нужно найти в коллекции.The name of the StatusBarPanel to find in the collection.
Возвращаемое значение
Отсчитываемый от нуля индекс для первого вхождения панели StatusBarPanel с заданным ключом; в противном случае — значение -1.The zero-based index of the first occurrence of the StatusBarPanel with the specified key, if found; otherwise, -1.
Комментарии
Если IndexOfKey вызывается последовательно, последний возвращенный индекс будет проверяться на соответствие ключу первым, и если совпадений нет, поиск начинается в начале коллекции.If IndexOfKey is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection.
NameСвойство соответствует ключу для StatusBarPanel в StatusBar.StatusBarPanelCollection .The Name property corresponds to the key for a StatusBarPanel in the StatusBar.StatusBarPanelCollection. При сравнении ключей регистр символов не учитывается.The key comparison is not case-sensitive.
Если key
параметр имеет значение null
или является пустой строкой, IndexOfKey возвращает значение-1.If the key
parameter is null
or an empty string, IndexOfKey returns -1.