InteractiveSession.IsRemote 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示调用进程是否在远程桌面会话中运行。
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
属性值
Boolean
bool
如果当前进程在远程会话中运行,则包含 True ;否则包含 False 。
示例
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")))