Variant Structure |
public struct Variant
The Variant type exposes the following members.
| Name | Description | |
|---|---|---|
| Variant | Initializes a new instance of the Variant class | |
| Variant(Double) | Creates a variant containing a double value. | |
| Variant(Object) | Creates a variant from an object (string or double). | |
| Variant(String) | Creates a variant containing a string value. |
| Name | Description | |
|---|---|---|
| IsDouble | True when the variant contains a double value. | |
| IsDoubleOrNaN | True when the variant contains a double or has no string value. | |
| IsEmpty | True when the variant is empty. | |
| IsString | True when the variant contains a string. |
| Name | Description | |
|---|---|---|
| AsDateTime | Return the contained value as a DateTime relative to 1970-01-01 UTC or null. | |
| AsDouble | Return the contained value as double or NaN when empty. | |
| AsString | Return the contained value as string or empty string when empty. | |
| AsTimeSpan | Return the contained value as a TimeSpan or null. | |
| Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType) | |
| GetHashCode | Returns the hash code for this instance. (Inherited from ValueType) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType) | |
| ValueType | Returns the currently stored variant type. |
| Name | Description | |
|---|---|---|
| (Variant to Double) | Implicit conversion to double for variants. | |
| (Variant to String) | Implicit conversion to string for variants. |