Table of Contents

Class BsonNull

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

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

BsonType

Value

Gets the singleton instance of BsonNull.

public static BsonNull Value { get; }

Property Value

BsonNull

Methods

CompareTo(BsonNull)

Compares this BsonNull to another BsonNull.

public int CompareTo(BsonNull other)

Parameters

other BsonNull

The 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

other BsonValue

The 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

rhs BsonNull

The 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

obj object

The 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

lhs BsonNull

The first BsonNull.

rhs BsonNull

The other BsonNull.

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

lhs BsonNull

The first BsonNull.

rhs BsonNull

The other BsonNull.

Returns

bool

True if the two BsonNull values are not equal according to ==.