Class Variable
public class Variable
- Inheritance
-
Variable
- Inherited Members
Constructors
Variable()
public Variable()
Properties
DefaultValue
Gets or sets an optional initial value for the variable, represented as a string. If specified (i.e., it is not null), the string will be converted to the type defined by Type and used as the initial value for the variable. Otherwise, the default value for the type defined by Type will be used as the initial value for the variable.
public string? DefaultValue { get; set; }
Property Value
Description
public string? Description { get; set; }
Property Value
Name
public string Name { get; set; }
Property Value
ResolvedType
Gets the type resolved from Type.
public Type ResolvedType { get; }
Property Value
Type
Gets or sets the variable value type, which defines how type conversions are performed. This defaults to object, which means no type conversions will be performed. ResolveType(object) is used to resolve this value to a specific type.
public object Type { get; set; }
Property Value
Exceptions
- ArgumentNullException
When setting, the value is null.
- InvalidOperationException
When setting, a type cannot be resolved from an object of the type of the value.
- InvalidOperationException
When setting, a type cannot be resolved from the value of the value when it is a string.