ValueVariantT1, T2 Structure

CVB.Net Documentation
A variant stores one value of either type T1 or T2.

Namespace:  Stemmer.Cvb.GevServer
Assembly:  Stemmer.Cvb.GevServer (in Stemmer.Cvb.GevServer.dll) Version: 14.0.0.0
Syntax

public struct ValueVariant<T1, T2> : IStrongBox

Type Parameters

T1
First type to store.
T2
Second type to store.

The ValueVariantT1, T2 type exposes the following members.

Constructors

  NameDescription
Public methodValueVariantT1, T2(T1)
Creates a new variant from the given value.
Public methodValueVariantT1, T2(T2)
Creates a new variant from the given value.
Top
Properties

  NameDescription
Public propertyIsSet
Gets whether a value is set at all.
Public propertyIsT1
Gets whether a value of type T1 is set.
Public propertyIsT2
Gets whether a value of type T2 is set.
Top
Methods

  NameDescription
Public methodAssign(T1)
Assigns the given value to this variant.
Public methodAssign(T2)
Assigns the given value to this variant.
Public methodAsT1
Gets the value as T1.
Public methodAsT2
Gets the value as T2.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReset
Resets the value.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Public methodToVariantO1, O2
Translates this variant to another variant.
Top
Operators

  NameDescription
Public operatorStatic member(T1 to ValueVariantT1, T2)
Implicitly creates a new variant from the given value.
Public operatorStatic member(T2 to ValueVariantT1, T2)
Implicitly creates a new variant from the given value.
Public operatorStatic member(ValueVariantT1, T2 to T1)
Implicitly converts the variant value to its T1 value.
Public operatorStatic member(ValueVariantT1, T2 to T2)
Implicitly converts the variant value to its T1 value.
Top
Explicit Interface Implementations

  NameDescription
Explicit interface implementationPrivate propertyIStrongBoxValue
Gets or sets the value that an object references.
Top
Remarks

Value access is type safe.
See Also

Reference