Share via


InteractiveSession.IsRemote Property

Definition

Indicates whether the calling process is running in a Remote Desktop session.

public:
 static property bool IsRemote { bool get(); };
static bool IsRemote();
public static bool IsRemote { get; }
var boolean = InteractiveSession.isRemote;
Public Shared ReadOnly Property IsRemote As Boolean

Property Value

Boolean

bool

Contains True if the current process is running in a remote session or False otherwise.

Examples

OutputTextBlock1.Text = String.Format("The current session is : {0}", 
    (InteractiveSession.IsRemote ? "Remote" : "Local"));
OutputTextBlock1->Text = "The current session is : " + 
    (Windows::System::RemoteDesktop::InteractiveSession::IsRemote ? "Remote" : "Local");
OutputTextBlock1.Text = String.Format("The current session is : {0}",
    (If(InteractiveSession.IsRemote, "Remote", "Local")))

Applies to