[]
Returns the zero-based index of the element with specified key in the BaseKeyCollection.
public virtual int IndexOf(string key)
Public Overridable Function IndexOf(key As String) As Integer
Type | Name | Description |
---|---|---|
string | key | The key of the element to locate in the BaseKeyCollection. |
Type | Description |
---|---|
int | The zero-based index of the element with specified key within the BaseKeyCollection, if found; otherwise, -1. |
Searches for the specified object and returns the zero-based index within the BaseKeyCollection.
public virtual int IndexOf(object value)
Public Overridable Function IndexOf(value As Object) As Integer
Type | Name | Description |
---|---|---|
object | value | The Object to locate in the BaseKeyCollection. |
Type | Description |
---|---|
int | The zero-based index of the element within the BaseKeyCollection, if found; otherwise, -1. |