1
using
System.Security.Principal;
2
3
public
static
bool
IsAdminRole()
4
{5 WindowsPrincipal myPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); 6 return myPrincipal.IsInRole(WindowsBuiltInRole.Administrator);7 }
转载于:https://www.cnblogs.com/skyfei/archive/2006/07/17/452867.html
转载请注明原文地址: https://win8.8miu.com/read-1478948.html