Click or drag to resize

BsonElement Structure

Represents a BSON element.

Namespace:  MongoDB.Bson
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
[SerializableAttribute]
public struct BsonElement : IComparable<BsonElement>, 
	IEquatable<BsonElement>

The BsonElement type exposes the following members.

Constructors
  NameDescription
Public methodBsonElement
Initializes a new instance of the BsonElement class.
Top
Properties
  NameDescription
Public propertyName
Gets the name of the element.
Public propertyValue
Gets or sets the value of the element.
Top
Methods
  NameDescription
Public methodClone
Creates a shallow clone of the element (see also DeepClone).
Public methodCompareTo
Compares this BsonElement to another BsonElement.
Public methodDeepClone
Creates a deep clone of the element (see also Clone).
Public methodEquals(Object)
Compares this BsonElement to another object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(BsonElement)
Compares this BsonElement to another BsonElement.
Public methodGetHashCode
Gets the hash code.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string representation of the value.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two BsonElements.
Public operatorStatic memberInequality
Compares two BsonElements.
Top
Extension Methods
  NameDescription
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.)
Top
See Also