Class SimDataObject
Represents an object in a SimData resource: a row of values described by a SimDataSchema (🔓)
public sealed class SimDataObject
- Inheritance
-
SimDataObject
- Inherited Members
Remarks
Each value's .NET type is determined by its column's SimDataType: BOOL is bool; CHAR8 and UINT8 are byte; INT8 is sbyte; INT16 is short; UINT16 is ushort; INT32 is int; UINT32 and LOCKEY are uint; INT64 is long; UINT64 and TABLESETREFERENCE are ulong; FLOAT is float; FLOAT2, FLOAT3 and FLOAT4 are Vector2, Vector3 and Vector4; RESOURCEKEY is ResourceKey; STRING8 and HASHEDSTRING8 are string (or null; the hash of a HASHEDSTRING8 is computed when encoding); OBJECT is SimDataObject, VECTOR is SimDataVector, and VARIANT is SimDataVariant (each or null).
Constructors
SimDataObject(SimDataSchema)
Initializes a new SimDataObject with the specified schema, all of its values defaulted (zero, or null for references)
public SimDataObject(SimDataSchema schema)
Parameters
schemaSimDataSchema
Properties
this[int]
Gets/sets the value of the column at the specified columnIndex
public object? this[int columnIndex] { get; set; }
Parameters
columnIndexint
Property Value
Exceptions
- ArgumentException
The value is not of the .NET type the column's SimDataType requires
this[string]
Gets/sets the value of the column with the specified columnName
public object? this[string columnName] { get; set; }
Parameters
columnNamestring
Property Value
Exceptions
- ArgumentException
There is no such column, or the value is not of the .NET type the column's SimDataType requires
Schema
Gets the schema of the object
public SimDataSchema Schema { get; }