Table of Contents

Method IndexOf

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

IndexOf(BsonValue)

Gets the index of a value in the array.

public override int IndexOf(BsonValue value)

Parameters

value BsonValue

The 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 override int IndexOf(BsonValue value, int index)

Parameters

value BsonValue

The value to search for.

index int

The 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 override int IndexOf(BsonValue value, int index, int count)

Parameters

value BsonValue

The value to search for.

index int

The zero based index at which to start the search.

count int

The number of elements to search.

Returns

int

The zero based index of the value (or -1 if not found).