[]
Defines a variant type.
public struct Variant : IEquatable<Variant>, IComparable<Variant>, IComparable, IFormattable
The size of structure is 24b.
| Name | Description |
|---|---|
| Variant(bool) | Initializes a new instance of the Variant with the specified boolean value. |
| Variant(char) | Initializes a new instance of the Variant with the specified char value. |
| Variant(DateTime) | Initializes a new instance of the Variant with the DateTime value. |
| Variant(decimal) | Initializes a new instance of the Variant with the specified decimal value. |
| Variant(double) | Initializes a new instance of the Variant with the specified double value. |
| Variant(int) | Initializes a new instance of the Variant with the specified integer value. |
| Variant(long) | Initializes a new instance of the Variant with the specified long integer value. |
| Variant(float) | Initializes a new instance of the Variant with the specified float value. |
| Variant(string) | Initializes a new instance of the Variant with the string value. |
| Variant(TimeSpan) | Initializes a new instance of the Variant with the TimeSpan value. |
| Variant(ulong) | Initializes a new instance of the Variant with the specified unsigned long integer value. |
| Name | Description |
|---|---|
| Comparer | A Variant.VariantComparer instance. |
| False | Predefined boolean 'False'. |
| Null | Predefined 'Null' value. |
| True | Predefined boolean 'True'. |
| Zero | Predefined 'Zero' value. |
| Name | Description |
|---|---|
| ErrorValue | Gets the VariantError if this variant is an Error type. |
| IsError | Checks if the variant value is an error. |
| IsNull | Checks if the variant value is null. |
| IsNullOrEmptyString | Checks if the variant value is null or empty string. |
| IsNullOrError | Checks if the Variant value is a null or error. |
| Type | The type of value represented with the Variant. |
| Name | Description |
|---|---|
| And(Variant, Variant) | Applies boolean '&&' to booleans and bitwise '&' to numeric. |
| Array(object) | Initializes a new instance of the Variant with Array type. |
| CompareTo(Variant) | Compares the Variant with the specified one. |
| CompareTo(object) | Compares the Variant with the specified object. |
| ConvertTo(VariantType) | Converts the variant to the specified type. |
| CreateError(string, ErrorCode, string) | Creates a new Error Variant with the specified message and error code. |
| DateToString(Variant, CultureInfo) | Converts date to string. |
| Equals(Variant) | Checks whether the Variant equals to the specified one. |
| Equals(object) | Checks whether the Variant equals to the specified object. |
| FromObject(object) | Initializes a new instance of the Variant from the value specified as object. The type of variant will be inferred from the specified value. |
| GetHashCode() | Gets hash code for the variant. |
| Or(Variant, Variant) | Applies boolean '||' to booleans and bitwise '|' to numeric. |
| Pow(Variant, Variant) | Returns a specified Variant raised to the specified power. |
| ToDateTimeVariant() | Tries to convert Variant value to DateTime. |
| ToDoubleVariant() | Tries to convert Variant containing value to double. |
| ToIntVariant() | Tries to convert Variant containing value to GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.Int64. |
| ToObject() | Converts the Variant to the object. |
| ToString() | Converts Variant to the string representation. |
| ToString(IFormatProvider) | Converts Variant to the string representation with given format provider. |
| ToString(string, IFormatProvider) | Converts Variant to the string representation with specified format and format provider. |
| Xor(Variant, Variant) | Applies boolean '!=' to booleans and bitwise '^' to numeric. |
| Name | Description |
|---|---|
| operator +(Variant, Variant) | Sums two variants. |
| operator +(Variant, long) | Sums the Variant and long value. |
| operator /(Variant, Variant) | Divides one variant by another. |
| operator /(Variant, double) | Divides Variant by double. |
| operator ==(Variant, Variant) | Checks whether two given Variants are equal. |
| explicit operator bool(Variant) | Converts given Variant to boolean. |
| explicit operator DateTime(Variant) | Converts Variant value to DateTime. |
| explicit operator decimal(Variant) | Converts Variant value to decimal. |
| explicit operator double(Variant) | Converts Variant value to double. |
| explicit operator int(Variant) | Converts Variant value to int. |
| explicit operator long(Variant) | Converts Variant value to long. |
| explicit operator float(Variant) | Converts Variant value to float. |
| explicit operator string(Variant) | Converts Variant value to string. |
| explicit operator TimeSpan(Variant) | Converts Variant value to GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.TimeSpan. |
| explicit operator ulong(Variant) | Converts Variant value to ulong. |
| operator >(Variant, Variant) | Checks whether the one variant is greater than another. |
| operator >=(Variant, Variant) | Checks whether the one variant is greater or equal to another. |
| operator !=(Variant, Variant) | Checks whether two given Variants are different. |
| operator <<(Variant, int) | Bitwise shift to the left. |
| operator <(Variant, Variant) | Checks whether the one variant is less than another. |
| operator <=(Variant, Variant) | Checks whether the one variant is less or equal to another. |
| operator !(Variant) | Performs a logical negation on a Variant value if it is of boolean type, or a bitwise negation if it is of a numeric type. |
| operator %(Variant, Variant) | Computes the remainder after dividing its first operand by its second. |
| operator *(Variant, Variant) | Multiplies two variants. |
| operator >>(Variant, int) | Bitwise shift to the right. |
| operator -(Variant, Variant) | Subtracts one Variant from another. |
| operator -(Variant) | Negates the given numerical variant. |
| operator +(Variant) | Tries to convert string variant to numeric, raises expceptions for other non-numeric types, does nothing for all numeric types. |