Method IndexOf
IndexOf(BsonValue)
Gets the index of a value in the array.
public virtual int IndexOf(BsonValue value)
Parameters
valueBsonValueThe value to search for.
Returns
- int
The zero based index of the value (or -1 if not found).
IndexOf(BsonValue, int)
Gets the index of a value in the array.
public virtual int IndexOf(BsonValue value, int index)
Parameters
valueBsonValueThe value to search for.
indexintThe zero based index at which to start the search.
Returns
- int
The zero based index of the value (or -1 if not found).
IndexOf(BsonValue, int, int)
Gets the index of a value in the array.
public virtual int IndexOf(BsonValue value, int index, int count)
Parameters
valueBsonValueThe value to search for.
indexintThe zero based index at which to start the search.
countintThe number of elements to search.
Returns
- int
The zero based index of the value (or -1 if not found).