Class SimDataVariant
Represents a VARIANT value: a type hash and an optional value of any SimDataType (🔒)
public sealed class SimDataVariant
- Inheritance
-
SimDataVariant
- Inherited Members
Constructors
SimDataVariant(uint)
Initializes a new SimDataVariant with the specified typeHash and no value
public SimDataVariant(uint typeHash)
Parameters
typeHashuint
SimDataVariant(uint, SimDataType, object?)
Initializes a new SimDataVariant with the specified typeHash and a value of the specified type
public SimDataVariant(uint typeHash, SimDataType type, object? value)
Parameters
typeHashuintThe type hash of the variant
typeSimDataTypeThe type of
valuevalueobjectThe value, which may be null only for STRING8, HASHEDSTRING8, VECTOR and VARIANT
Exceptions
- ArgumentOutOfRangeException
typeis not a defined SimDataType- ArgumentException
valueis not of the .NET type SimDataObject describes fortype, or is null for OBJECT
Properties
Type
public SimDataType? Type { get; }
Property Value
TypeHash
Gets the type hash of the variant
public uint TypeHash { get; }
Property Value
Value
Gets the value of the variant (null when Type is null, and possibly when it is a type that admits null)
public object? Value { get; }