SharedState.Set method

Add or overwrite a value (reference‑types only).

public bool Set(string name, object? value, bool allowsValueType = false)
parameter description
name The name of the variable to set.
value The value to set. Must be a reference type unless allowsValueType is true.
allowsValueType If true, allows setting value types; otherwise, only reference types are allowed.

Return Value

true if the value was set successfully.

See Also