API ReferenceSandbox
Variantclass
A Variant is a type that can hold any value, and also keeps track of the type of the value it holds. It's useful for cases where you want to store a value of an unknown type, or when you want to serialize/deserialize values of various types in a generic way.
object→Variant
Constructors1
Showing 1 constructors
No results match this filter.
Methods3
Showing 3 methods
public T Get()
Returns:
T—public static override object JsonRead(System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert)
| Parameter | Type | Description |
|---|---|---|
| reader | Utf8JsonReader | — |
| typeToConvert | Type | — |
Returns:
object—public static override void JsonWrite(object value, System.Text.Json.Utf8JsonWriter writer)
| Parameter | Type | Description |
|---|---|---|
| value | object | — |
| writer | Utf8JsonWriter | — |
Returns:
void—No results match this filter.
Properties2
Showing 2 properties
public System.Type Sandbox.Variant.Type { get; set; }
The type of the value currently stored in the Variant. This is automatically set when you assign a value to the Variant.
public object Sandbox.Variant.Value { get; set; }
Gets or sets the value associated with this instance.
Returns:
object—No results match this filter.