设为首页 加入收藏

TOP

C#如何判断当前用户是否输入某个域?
2014-11-23 22:15:52 来源: 作者: 【 】 浏览:2
Tags:如何 判断 当前 用户 是否 输入 某个

代码如下:


WindowsIdentity currentIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal currentPrincipal = new WindowsPrincipal(currentIdentity);
if (currentPrincipal.IsInRole(@”HZ\Domain Users”))
{
this.button1.Text = “YEAH!”;
}


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇网络工程师常见的面试题笔试题(1) 下一篇Why Is a Process Model Importan..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: