Click or drag to resize

Variant Structure

Variant that can hold either a Double value or a String
Inheritance Hierarchy
SystemObject
  SystemValueType
    Altaxo.Serialization.OriginVariant

Namespace: Altaxo.Serialization.Origin
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public struct Variant

The Variant type exposes the following members.

Constructors
 NameDescription
Public methodVariantInitializes a new instance of the Variant class
Public methodVariant(Double)Creates a variant containing a double value.
Public methodVariant(Object)Creates a variant from an object (string or double).
Public methodVariant(String)Creates a variant containing a string value.
Top
Properties
 NameDescription
Public propertyIsDoubleTrue when the variant contains a double value.
Public propertyIsDoubleOrNaNTrue when the variant contains a double or has no string value.
Public propertyIsEmptyTrue when the variant is empty.
Public propertyIsStringTrue when the variant contains a string.
Top
Methods
 NameDescription
Public methodAsDateTimeReturn the contained value as a DateTime relative to 1970-01-01 UTC or null.
Public methodAsDoubleReturn the contained value as double or NaN when empty.
Public methodAsStringReturn the contained value as string or empty string when empty.
Public methodAsTimeSpanReturn the contained value as a TimeSpan or null.
Public methodEqualsIndicates whether this instance and a specified object are equal.
(Inherited from ValueType)
Public methodGetHashCodeReturns the hash code for this instance.
(Inherited from ValueType)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)
Public methodValueTypeReturns the currently stored variant type.
Top
Operators
 NameDescription
Public operatorStatic member(Variant to Double)Implicit conversion to double for variants.
Public operatorStatic member(Variant to String)Implicit conversion to string for variants.
Top
See Also