Click or drag to resize

BsonArray Class

Represents a BSON array.
Inheritance Hierarchy

Namespace:  MongoDB.Bson
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax
[SerializableAttribute]
public class BsonArray : BsonValue, IComparable<BsonArray>, 
	IEquatable<BsonArray>, IList<BsonValue>, ICollection<BsonValue>, 
	IEnumerable<BsonValue>, IEnumerable

The BsonArray type exposes the following members.

Constructors
  NameDescription
Public methodBsonArray
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerable)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableBsonValue)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableObjectId)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableBoolean)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableDateTime)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableDouble)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableInt32)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableInt64)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(IEnumerableString)
Initializes a new instance of the BsonArray class.
Public methodBsonArray(Int32)
Initializes a new instance of the BsonArray class.
Top
Properties
  NameDescription
Public propertyAsBoolean
Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonArray
Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonBinaryData
Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonDateTime
Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonDocument
Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonJavaScript
Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonJavaScriptWithScope
Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonMaxKey
Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonMinKey
Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonNull
Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonRegularExpression
Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonSymbol
Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonTimestamp
Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonUndefined
Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsBsonValue
Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time).
(Inherited from BsonValue.)
Public propertyAsByteArray
Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsDateTime Obsolete.
Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsDecimal
Casts the BsonValue to a Decimal (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsDecimal128
Casts the BsonValue to a Decimal128 (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsDouble
Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsGuid
Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsInt32
Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsInt64
Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsLocalTime Obsolete.
Casts the BsonValue to a DateTime in the local timezone (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableBoolean
Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableDateTime Obsolete.
Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableDecimal
Casts the BsonValue to a Nullable{Decimal} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableDecimal128
Casts the BsonValue to a Nullable{Decimal128} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableDouble
Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableGuid
Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableInt32
Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableInt64
Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsNullableObjectId
Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsObjectId
Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsRegex
Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsString
Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyAsUniversalTime Obsolete.
Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid).
(Inherited from BsonValue.)
Public propertyBsonType
Gets the BsonType of this BsonValue.
(Overrides BsonValueBsonType.)
Public propertyCapacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
Public propertyCount
Gets the count of array elements.
Public propertyIsBoolean
Tests whether this BsonValue is a Boolean.
(Inherited from BsonValue.)
Public propertyIsBsonArray
Tests whether this BsonValue is a BsonArray.
(Inherited from BsonValue.)
Public propertyIsBsonBinaryData
Tests whether this BsonValue is a BsonBinaryData.
(Inherited from BsonValue.)
Public propertyIsBsonDateTime
Tests whether this BsonValue is a BsonDateTime.
(Inherited from BsonValue.)
Public propertyIsBsonDocument
Tests whether this BsonValue is a BsonDocument.
(Inherited from BsonValue.)
Public propertyIsBsonJavaScript
Tests whether this BsonValue is a BsonJavaScript.
(Inherited from BsonValue.)
Public propertyIsBsonJavaScriptWithScope
Tests whether this BsonValue is a BsonJavaScriptWithScope.
(Inherited from BsonValue.)
Public propertyIsBsonMaxKey
Tests whether this BsonValue is a BsonMaxKey.
(Inherited from BsonValue.)
Public propertyIsBsonMinKey
Tests whether this BsonValue is a BsonMinKey.
(Inherited from BsonValue.)
Public propertyIsBsonNull
Tests whether this BsonValue is a BsonNull.
(Inherited from BsonValue.)
Public propertyIsBsonRegularExpression
Tests whether this BsonValue is a BsonRegularExpression.
(Inherited from BsonValue.)
Public propertyIsBsonSymbol
Tests whether this BsonValue is a BsonSymbol .
(Inherited from BsonValue.)
Public propertyIsBsonTimestamp
Tests whether this BsonValue is a BsonTimestamp.
(Inherited from BsonValue.)
Public propertyIsBsonUndefined
Tests whether this BsonValue is a BsonUndefined.
(Inherited from BsonValue.)
Public propertyIsDateTime Obsolete.
Tests whether this BsonValue is a DateTime.
(Inherited from BsonValue.)
Public propertyIsDecimal128
Tests whether this BsonValue is a Decimal128.
(Inherited from BsonValue.)
Public propertyIsDouble
Tests whether this BsonValue is a Double.
(Inherited from BsonValue.)
Public propertyIsGuid
Tests whether this BsonValue is a Guid.
(Inherited from BsonValue.)
Public propertyIsInt32
Tests whether this BsonValue is an Int32.
(Inherited from BsonValue.)
Public propertyIsInt64
Tests whether this BsonValue is an Int64.
(Inherited from BsonValue.)
Public propertyIsNumeric
Tests whether this BsonValue is a numeric value.
(Inherited from BsonValue.)
Public propertyIsObjectId
Tests whether this BsonValue is an ObjectId .
(Inherited from BsonValue.)
Public propertyIsReadOnly
Gets whether the array is read-only.
Public propertyIsString
Tests whether this BsonValue is a String.
(Inherited from BsonValue.)
Public propertyIsValidDateTime
Tests whether this BsonValue is a valid DateTime.
(Inherited from BsonValue.)
Public propertyItemInt32
Gets or sets a value by position.
(Overrides BsonValueItemInt32.)
Public propertyItemString
Gets or sets a value by name (only applies to BsonDocument).
(Inherited from BsonValue.)
Public propertyRawValue Obsolete.
Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value).
(Inherited from BsonValue.)
Public propertyRawValues Obsolete.
Gets the array elements as raw values (see BsonValue.RawValue).
Public propertyValues
Gets the array elements.
Top
Methods
  NameDescription
Public methodAdd
Adds an element to the array.
Public methodAddRange(IEnumerable)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableBsonValue)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableObjectId)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableBoolean)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableDateTime)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableDouble)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableInt32)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableInt64)
Adds multiple elements to the array.
Public methodAddRange(IEnumerableString)
Adds multiple elements to the array.
Public methodClear
Clears the array.
Public methodClone
Creates a shallow clone of the array (see also DeepClone).
(Overrides BsonValueClone.)
Public methodCompareTo(BsonArray)
Compares the array to another array.
Public methodCompareTo(BsonValue)
Compares the array to another BsonValue.
(Overrides BsonValueCompareTo(BsonValue).)
Public methodCompareTypeTo
Compares the type of this BsonValue to the type of another BsonValue.
(Inherited from BsonValue.)
Public methodContains
Tests whether the array contains a value.
Public methodCopyTo(BsonValue, Int32)
Copies elements from this array to another array.
Public methodCopyTo(Object, Int32) Obsolete.
Copies elements from this array to another array as raw values (see BsonValue.RawValue).
Public methodStatic memberCreate
Creates a new BsonArray.
Public methodDeepClone
Creates a deep clone of the array (see also Clone).
(Overrides BsonValueDeepClone.)
Public methodEquals(BsonArray)
Compares this array to another array.
Public methodEquals(BsonValue)
Compares this BsonValue to another BsonValue.
(Inherited from BsonValue.)
Public methodEquals(Object)
Compares this BsonArray to another object.
(Overrides BsonValueEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Gets an enumerator that can enumerate the elements of the array.
Public methodGetHashCode
Gets the hash code.
(Overrides BsonValueGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIConvertibleGetTypeCodeImplementation
Implementation of the IConvertible GetTypeCode method.
(Inherited from BsonValue.)
Protected methodIConvertibleToBooleanImplementation
Implementation of the IConvertible ToBoolean method.
(Inherited from BsonValue.)
Protected methodIConvertibleToByteImplementation
Implementation of the IConvertible ToByte method.
(Inherited from BsonValue.)
Protected methodIConvertibleToCharImplementation
Implementation of the IConvertible ToChar method.
(Inherited from BsonValue.)
Protected methodIConvertibleToDateTimeImplementation
Implementation of the IConvertible ToDateTime method.
(Inherited from BsonValue.)
Protected methodIConvertibleToDecimalImplementation
Implementation of the IConvertible ToDecimal method.
(Inherited from BsonValue.)
Protected methodIConvertibleToDoubleImplementation
Implementation of the IConvertible ToDouble method.
(Inherited from BsonValue.)
Protected methodIConvertibleToInt16Implementation
Implementation of the IConvertible ToInt16 method.
(Inherited from BsonValue.)
Protected methodIConvertibleToInt32Implementation
Implementation of the IConvertible ToInt32 method.
(Inherited from BsonValue.)
Protected methodIConvertibleToInt64Implementation
Implementation of the IConvertible ToInt64 method.
(Inherited from BsonValue.)
Protected methodIConvertibleToSByteImplementation
Implementation of the IConvertible ToSByte method.
(Inherited from BsonValue.)
Protected methodIConvertibleToSingleImplementation
Implementation of the IConvertible ToSingle method.
(Inherited from BsonValue.)
Protected methodIConvertibleToStringImplementation
Implementation of the IConvertible ToString method.
(Inherited from BsonValue.)
Protected methodIConvertibleToUInt16Implementation
Implementation of the IConvertible ToUInt16 method.
(Inherited from BsonValue.)
Protected methodIConvertibleToUInt32Implementation
Implementation of the IConvertible ToUInt32 method.
(Inherited from BsonValue.)
Protected methodIConvertibleToUInt64Implementation
Implementation of the IConvertible ToUInt64 method.
(Inherited from BsonValue.)
Public methodIndexOf(BsonValue)
Gets the index of a value in the array.
Public methodIndexOf(BsonValue, Int32)
Gets the index of a value in the array.
Public methodIndexOf(BsonValue, Int32, Int32)
Gets the index of a value in the array.
Public methodInsert
Inserts a new value into the array.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOperatorEqualsImplementation
Implementation of operator ==.
(Inherited from BsonValue.)
Public methodRemove
Removes the first occurrence of a value from the array.
Public methodRemoveAt
Removes an element from the array.
Public methodToArray
Converts the BsonArray to an array of BsonValues.
Public methodToBoolean
Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness).
(Inherited from BsonValue.)
Public methodToDecimal
Converts this BsonValue to a Decimal.
(Inherited from BsonValue.)
Public methodToDecimal128
Converts this BsonValue to a Decimal128.
(Inherited from BsonValue.)
Public methodToDouble
Converts this BsonValue to a Double.
(Inherited from BsonValue.)
Public methodToInt32
Converts this BsonValue to an Int32.
(Inherited from BsonValue.)
Public methodToInt64
Converts this BsonValue to an Int64.
(Inherited from BsonValue.)
Public methodToList
Converts the BsonArray to a list of BsonValues.
Public methodToLocalTime
Converts this BsonValue to a DateTime in local time.
(Inherited from BsonValue.)
Public methodToNullableLocalTime
Converts this BsonValue to a DateTime? in local time.
(Inherited from BsonValue.)
Public methodToNullableUniversalTime
Converts this BsonValue to a DateTime? in UTC.
(Inherited from BsonValue.)
Public methodToString
Returns a string representation of the array.
(Overrides ObjectToString.)
Public methodToUniversalTime
Converts this BsonValue to a DateTime in UTC.
(Inherited from BsonValue.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two BsonArray values.
Public operatorStatic memberInequality
Compares two BsonArray values.
Top
Extension Methods
  NameDescription
Public Extension MethodAllElementsBsonValue
Represents all elements in an array (corresponds to the server's "$[]" update operator).
(Defined by MongoEnumerable.)
Public Extension MethodAllMatchingElementsBsonValue
Represents all matching elements in an array when using an array filter (corresponds to the server's "$[identifier]" update operator).
(Defined by MongoEnumerable.)
Public Extension MethodContainsAllBsonValue
Determines whether a sequence contains all of the specified values.
(Defined by LinqToMongo.)
Public Extension MethodContainsAnyBsonValue
Determines whether a sequence contains any of the specified values.
(Defined by LinqToMongo.)
Public Extension MethodFirstMatchingElementBsonValue
Represents the first matching element in an array used in a query (corresponds to the server's "$" update operator).
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, Int32)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, NullableInt32)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, Int64)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, NullableInt64)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, Single)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, NullableSingle)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, Double)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, NullableDouble)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, Decimal)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationBsonValue(FuncBsonValue, NullableDecimal)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, Int32)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, NullableInt32)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, Int64)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, NullableInt64)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, Single)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, NullableSingle)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, Double)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, NullableDouble)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, Decimal)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleBsonValue(FuncBsonValue, NullableDecimal)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodWhereBsonValue
Filters a sequence of values based on a predicate and limits the number of results.
(Defined by MongoEnumerable.)
Top
See Also