Struct ScalarValue
Holds one string, boolean, double, Int32, or Int64 without widening BSON integers.
public readonly struct ScalarValue : IEquatable<ScalarValue>
- Implements
- Inherited Members
Properties
BooleanValue
public bool BooleanValue { get; }
Property Value
DoubleValue
public double DoubleValue { get; }
Property Value
Int32Value
public int Int32Value { get; }
Property Value
Int64Value
public long Int64Value { get; }
Property Value
Kind
public ScalarValueKind Kind { get; }
Property Value
StringValue
public string StringValue { get; }
Property Value
Methods
Equals(ScalarValue)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ScalarValue other)
Parameters
otherScalarValueAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
From(bool)
public static ScalarValue From(bool value)
Parameters
valuebool
Returns
From(double)
public static ScalarValue From(double value)
Parameters
valuedouble
Returns
From(int)
public static ScalarValue From(int value)
Parameters
valueint
Returns
From(long)
public static ScalarValue From(long value)
Parameters
valuelong
Returns
From(string)
public static ScalarValue From(string value)
Parameters
valuestring
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(ScalarValue, ScalarValue)
public static bool operator ==(ScalarValue left, ScalarValue right)
Parameters
leftScalarValuerightScalarValue
Returns
operator !=(ScalarValue, ScalarValue)
public static bool operator !=(ScalarValue left, ScalarValue right)
Parameters
leftScalarValuerightScalarValue