SessionStateProxy.SetVariable(String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set a variable in session state.
public:
virtual void SetVariable(System::String ^ name, System::Object ^ value);
public:
virtual void SetVariable(Platform::String ^ name, Platform::Object ^ value);
virtual void SetVariable(std::wstring const & name, winrt::Windows::Foundation::IInspectable const & value);
public virtual void SetVariable (string name, object value);
abstract member SetVariable : string * obj -> unit
override this.SetVariable : string * obj -> unit
Public Overridable Sub SetVariable (name As String, value As Object)
Parameters
- name
- String
The name of the item to set.
- value
- Object
The new value of the item being set.
Exceptions
name is null
Runspace is not open.
Another SessionStateProxy call or another pipeline is in progress.