Class BsonArray
Represents a BSON array.
[Serializable]
public class BsonArray : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonArray>, IEquatable<BsonArray>, IList<BsonValue>, ICollection<BsonValue>, IEnumerable<BsonValue>, IEnumerable
- Inheritance
-
Bson
Array
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
- Bson
Array() Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<BsonValue>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<ObjectId>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<bool>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<DateTime>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<double>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<int>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<long>)
Initializes a new instance of the BsonArray class.
- BsonArray(IEnumerable<string>)
Initializes a new instance of the BsonArray class.
- Bson
Array(IEnumerable) Initializes a new instance of the BsonArray class.
- Bson
Array(int) Initializes a new instance of the BsonArray class.
Properties
- Bson
Type Gets the BsonType of this BsonValue.
- Capacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
- Count
Gets the count of array elements.
- Is
Read Only Gets whether the array is read-only.
- this[int]
Gets or sets a value by position.
- Raw
Values Gets the array elements as raw values (see BsonValue.RawValue).
- Values
Gets the array elements.
Methods
- Add(Bson
Value) Adds an element to the array.
- AddRange(IEnumerable<BsonValue>)
Adds multiple elements to the array.
- AddRange(IEnumerable<ObjectId>)
Adds multiple elements to the array.
- AddRange(IEnumerable<bool>)
Adds multiple elements to the array.
- AddRange(IEnumerable<DateTime>)
Adds multiple elements to the array.
- AddRange(IEnumerable<double>)
Adds multiple elements to the array.
- AddRange(IEnumerable<int>)
Adds multiple elements to the array.
- AddRange(IEnumerable<long>)
Adds multiple elements to the array.
- AddRange(IEnumerable<string>)
Adds multiple elements to the array.
- Add
Range(IEnumerable) Adds multiple elements to the array.
- Clear()
Clears the array.
- Clone()
Creates a shallow clone of the array (see also DeepClone).
- Compare
To(Bson Array) Compares the array to another array.
- Compare
To(Bson Value) Compares the array to another BsonValue.
- Contains(Bson
Value) Tests whether the array contains a value.
- Copy
To(Bson Value[], int) Copies elements from this array to another array.
- Copy
To(object[], int) Copies elements from this array to another array as raw values (see BsonValue.RawValue).
- Create(object)
Creates a new BsonArray.
- Deep
Clone() Creates a deep clone of the array (see also Clone).
- Equals(Bson
Array) Compares this array to another array.
- Equals(object)
Compares this BsonArray to another object.
- Get
Enumerator() Gets an enumerator that can enumerate the elements of the array.
- Get
Hash Code() Gets the hash code.
- Index
Of(Bson Value) Gets the index of a value in the array.
- Index
Of(Bson Value, int) Gets the index of a value in the array.
- Index
Of(Bson Value, int, int) Gets the index of a value in the array.
- Insert(int,
Bson Value) Inserts a new value into the array.
- Remove(Bson
Value) Removes the first occurrence of a value from the array.
- Remove
At(int) Removes an element from the array.
- To
Array() Converts the BsonArray to an array of BsonValues.
- To
List() Converts the BsonArray to a list of BsonValues.
- To
String() Returns a string representation of the array.
Operators
- operator ==(Bson
Array, Bson Array) Compares two BsonArray values.
- operator !=(Bson
Array, Bson Array) Compares two BsonArray values.