Struct PlessVariant
Implements variant structure which can contain data with different types.
public struct PlessVariant : IValueToString, IEquatable<PlessVariant>, IComparable, IComparable<PlessVariant>, IFormattable, IConvertible
- Implements
Constructors
- PlessVariant(bool)
Creates variant with the default value of the bool type.
- PlessVariant(char)
Creates variant with the default value of the char type.
- PlessVariant(DateTime)
Creates variant with the default value of the DateTime type.
- PlessVariant(decimal)
Creates variant with the default value of the decimal type.
- PlessVariant(double)
Creates variant with the default value of the double type.
- PlessVariant(long)
Creates variant with the default value of the long type.
- PlessVariant(object)
Creates variant with the default value of the object type.
- PlessVariant(float)
Creates variant with the default value of the float type.
- PlessVariant(string)
Creates variant with the default value of the string type.
- PlessVariant(ulong)
Creates variant with the default value of the ulong type.
Fields
- Empty
Gets an empty variant.
Properties
- AsDateTime
Gets or sets value as DateTime.
- Extender
Gets variant extender implementation.
- IsNull
Gets whether variant is null.
- ValueType
Gets type code of the value stored in this variant.
Methods
- Compare(PlessVariant, PlessVariant)
Compares two variant values.
- CompareTo(PlessVariant)
Compares this variant with another variant.
- CompareTo(object)
Compare this object with the another object.
- Equals(PlessVariant)
Checks if this object equals another object.
- Equals(PlessVariant, PlessVariant)
Gets whether to variants are equal.
- Equals(object)
Checks if this object equals another object.
- GetExtender(TypeCode)
Gets IPlessVariantExtender for the specified variant type.
- GetHashCode()
Returns the hash code of this variant.
- GetTypeCode()
Gets type code of this variant.
- SetExtender(TypeCode, IPlessVariantExtender)
Sets IPlessVariantExtender for the specified variant type.
- ToBoolean()
Converts this variant to bool if possible.
- ToBoolean(IFormatProvider)
Converts this variant to bool if possible using the specified format provider.
- ToByte(IFormatProvider)
Converts this variant to byte if possible using the specified format provider.
- ToChar(IFormatProvider)
Converts this variant to char if possible using the specified format provider.
- ToDateTime()
Converts this variant to DateTime if possible.
- ToDateTime(IFormatProvider)
Converts this variant to DateTime if possible using the specified format provider.
- ToDecimal()
Converts this variant to decimal if possible.
- ToDecimal(IFormatProvider)
Converts this variant to decimal if possible using the specified format provider.
- ToDouble()
Converts this variant to double if possible.
- ToDouble(IFormatProvider)
Converts this variant to double if possible using the specified format provider.
- ToInt16(IFormatProvider)
Converts this variant to short if possible using the specified format provider.
- ToInt32(IFormatProvider)
Converts this variant to int if possible using the specified format provider.
- ToInt64(IFormatProvider)
Converts this variant to long if possible using the specified format provider.
- ToSByte(IFormatProvider)
Converts this variant to sbyte if possible using the specified format provider.
- ToSingle()
Converts this variant to float if possible.
- ToSingle(IFormatProvider)
Converts this variant to float if possible using the specified format provider.
- ToString()
Converts the value to its equivalent string representation.
- ToString(IFormatProvider)
Converts the value to its equivalent string representation using the specified culture-specific format information.
- ToString(string)
Converts the value to its equivalent string representation, using the specified format.
- ToString(string, IFormatProvider)
Converts the value to its equivalent string representation using the specified format and culture-specific format information.
- ToUInt16()
Converts this variant to ushort if possible.
- ToUInt16(IFormatProvider)
Converts this variant to ushort if possible using the specified format provider.
- ToUInt32()
Converts this variant to uint if possible.
- ToUInt32(IFormatProvider)
Converts this variant to uint if possible using the specified format provider.
- ToUInt64()
Converts this variant to ulong if possible.
- ToUInt64(IFormatProvider)
Converts this variant to ulong if possible using the specified format provider.
Operators
- operator ==(PlessVariant, PlessVariant)
Tests whether two specified variants are equivalent.
- explicit operator bool(PlessVariant)
Implements explicit conversion operator from variant to bool value.
- explicit operator byte(PlessVariant)
Implements explicit conversion operator from variant to byte value.
- explicit operator char(PlessVariant)
Implements explicit conversion operator from variant to char value.
- explicit operator DateTime(PlessVariant)
Implements explicit conversion operator from variant to DateTime value.
- explicit operator decimal(PlessVariant)
Implements explicit conversion operator from variant to decimal value.
- explicit operator double(PlessVariant)
Implements explicit conversion operator from variant to double value.
- explicit operator short(PlessVariant)
Implements explicit conversion operator from variant to short value.
- explicit operator int(PlessVariant)
Implements explicit conversion operator from variant to int value.
- explicit operator long(PlessVariant)
Implements explicit conversion operator from variant to long value.
- explicit operator sbyte(PlessVariant)
Implements explicit conversion operator from variant to sbyte value.
- explicit operator float(PlessVariant)
Implements explicit conversion operator from variant to float value.
- explicit operator string(PlessVariant)
Implements explicit conversion operator from variant to string value.
- explicit operator ushort(PlessVariant)
Implements explicit conversion operator from variant to ushort value.
- explicit operator uint(PlessVariant)
Implements explicit conversion operator from variant to uint value.
- explicit operator ulong(PlessVariant)
Implements explicit conversion operator from variant to ulong value.
- operator >(PlessVariant, PlessVariant)
Determines whether one specified PlessVariant is greater than another specified PlessVariant.
- operator >=(PlessVariant, PlessVariant)
Determines whether one specified PlessVariant is greater or equal to another specified PlessVariant.
- implicit operator PlessVariant(bool)
Implements implicit conversion operator from the bool value to the variant.
- implicit operator PlessVariant(byte)
Implements implicit conversion operator from the byte value to the variant.
- implicit operator PlessVariant(char)
Implements implicit conversion operator from the char value to the variant.
- implicit operator PlessVariant(DateTime)
Implements implicit conversion operator from the DateTime value to the variant.
- implicit operator PlessVariant(decimal)
Implements implicit conversion operator from the decimal value to the variant.
- implicit operator PlessVariant(double)
Implements implicit conversion operator from the double value to the variant.
- implicit operator PlessVariant(short)
Implements implicit conversion operator from the short value to the variant.
- implicit operator PlessVariant(int)
Implements implicit conversion operator from the int value to the variant.
- implicit operator PlessVariant(long)
Implements implicit conversion operator from the long value to the variant.
- implicit operator PlessVariant(sbyte)
Implements implicit conversion operator from the sbyte value to the variant.
- implicit operator PlessVariant(float)
Implements implicit conversion operator from the float value to the variant.
- implicit operator PlessVariant(string)
Implements implicit conversion operator from the string value to the variant.
- implicit operator PlessVariant(ushort)
Implements implicit conversion operator from the ushort value to the variant.
- implicit operator PlessVariant(uint)
Implements implicit conversion operator from the uint value to the variant.
- implicit operator PlessVariant(ulong)
Implements implicit conversion operator from the ulong value to the variant.
- operator !=(PlessVariant, PlessVariant)
Tests whether two specified variants are different.
- operator <(PlessVariant, PlessVariant)
Determines whether one specified PlessVariant is less than another specified PlessVariant.
- operator <=(PlessVariant, PlessVariant)
Determines whether one specified PlessVariant is less or equal to another specified PlessVariant.