Partager via


SessionStateProxy.GetVariable(String) Method

Definition

Get a variable out of session state.

public:
 virtual System::Object ^ GetVariable(System::String ^ name);
public:
 virtual Platform::Object ^ GetVariable(Platform::String ^ name);
 virtual winrt::Windows::Foundation::IInspectable GetVariable(std::wstring const & name);
public virtual object GetVariable (string name);
abstract member GetVariable : string -> obj
override this.GetVariable : string -> obj
Public Overridable Function GetVariable (name As String) As Object

Parameters

name
String

name of variable to look up

Returns

The value of the specified variable.

Exceptions

name is null

Runspace is not open.

Another SessionStateProxy call or another pipeline is in progress.

Applies to