Skip to content

SetVariable Method ​

Definition ​

  • Namespace: JASE.Expressions
  • Assembly: JASE.Expressions.dll

Overloads ​

NameDescription
void SetVariable(string name, object value)Sets or replaces a variable in the current evaluation scope. The variable's runtime type is inferred from the value argument.
void SetVariable(string name, object value, Type type)Sets or replaces a variable in the current evaluation scope with an explicit type description used for reflection and type metadata.

void SetVariable(string name, object value) ​

csharp
void SetVariable(string name, object value)

Sets or replaces a variable in the current evaluation scope. The variable's runtime type is inferred from the value argument.

Parameters ​

NameDescription
nameThe variable name as it will be referenced in expressions.
valueThe value assigned to the variable. May be null.

void SetVariable(string name, object value, Type type) ​

csharp
void SetVariable(string name, object value, Type type)

Sets or replaces a variable in the current evaluation scope with an explicit type description used for reflection and type metadata.

Parameters ​

NameDescription
nameThe variable name as it will be referenced in expressions.
typeThe declared type of the variable used for member and method resolution. May differ from value's runtime type.
valueThe value assigned to the variable. May be null.