Class BsonNull
Represents the BSON Null value.
[Serializable]
public class BsonNull : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonNull>, IEquatable<BsonNull>
- Inheritance
-
BsonNull
- Implements
- Inherited Members
- Extension Methods
Properties
BsonType
Gets the BsonType of this BsonValue.
public override BsonType BsonType { get; }
Property Value
Value
Gets the singleton instance of BsonNull.
public static BsonNull Value { get; }
Property Value
Methods
CompareTo(BsonNull)
Compares this BsonNull to another BsonNull.
public int CompareTo(BsonNull other)
Parameters
otherBsonNullThe other BsonNull.
Returns
- int
A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other.
CompareTo(BsonValue)
Compares the BsonNull to another BsonValue.
public override int CompareTo(BsonValue other)
Parameters
otherBsonValueThe other BsonValue.
Returns
- int
A 32-bit signed integer that indicates whether this BsonNull is less than, equal to, or greather than the other BsonValue.
Equals(BsonNull)
Compares this BsonNull to another BsonNull.
public bool Equals(BsonNull rhs)
Parameters
rhsBsonNullThe other BsonNull.
Returns
- bool
True if the two BsonNull values are equal.
Equals(object)
Compares this BsonNull to another object.
public override bool Equals(object obj)
Parameters
objobjectThe other object.
Returns
- bool
True if the other object is a BsonNull and equal to this one.
GetHashCode()
Gets the hash code.
public override int GetHashCode()
Returns
- int
The hash code.
ToBoolean()
Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness).
public override bool ToBoolean()
Returns
- bool
A Boolean.
ToNullableLocalTime()
Converts this BsonValue to a DateTime? in local time.
public override DateTime? ToNullableLocalTime()
Returns
- DateTime?
A DateTime?.
ToNullableUniversalTime()
Converts this BsonValue to a DateTime? in UTC.
public override DateTime? ToNullableUniversalTime()
Returns
- DateTime?
A DateTime?.
ToString()
Returns a string representation of the value.
public override string ToString()
Returns
- string
A string representation of the value.
Operators
operator ==(BsonNull, BsonNull)
Compares two BsonNull values.
public static bool operator ==(BsonNull lhs, BsonNull rhs)
Parameters
Returns
- bool
True if the two BsonNull values are equal according to ==.
operator !=(BsonNull, BsonNull)
Compares two BsonNull values.
public static bool operator !=(BsonNull lhs, BsonNull rhs)
Parameters
Returns
- bool
True if the two BsonNull values are not equal according to ==.