MongoDBRef MembersMongoDB C# Driver API Documentation
The MongoDBRef type exposes the following members.
Constructors

  NameDescription
Public methodMongoDBRef(String, BsonValue)
Creates a MongoDBRef.
Public methodMongoDBRef(String, String, BsonValue)
Creates a MongoDBRef.
Back to Top
Methods

  NameDescription
Public methodEquals(Object)
Determines whether this instance and a specified object, which must also be a MongoDBRef object, have the same value.
(Overrides OnlineObject Equals(Object).)
Public methodEquals(MongoDBRef)
Determines whether this instance and another specified MongoDBRef object have the same value.
Public methodStatic memberEquals(MongoDBRef, MongoDBRef)
Determines whether two specified MongoDBRef objects have the same value.
Protected methodOnlineFinalize
Allows an OnlineObject to attempt to free resources and perform other cleanup operations before the OnlineObject is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodGetHashCode
Returns the hash code for this MongoDBRef object.
(Overrides OnlineObject GetHashCode .)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodToString
Returns a string representation of the value.
(Overrides OnlineObject ToString .)
Back to Top
Operators

  NameDescription
Public operatorStatic memberEquality
Determines whether two specified MongoDBRef objects have the same value.
Public operatorStatic memberInequality
Determines whether two specified MongoDBRef objects have different values.
Back to Top
Extension Methods

  NameDescription
Public Extension MethodToBson(Type)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, BsonBinaryWriterSettings)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, IBsonSerializationOptions, BsonBinaryWriterSettings)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument(Type)Overloaded.
Converts an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, JsonWriterSettings)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, IBsonSerializationOptions, JsonWriterSettings)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Back to Top
Properties

  NameDescription
Public propertyCollectionName
Gets the name of the collection that contains the document.
Public propertyDatabaseName
Gets the name of the database that contains the document.
Public propertyId
Gets the Id of the document.
Back to Top
See Also