通过本文主要向大家介绍了c#程序示例,c#示例,c#代码示例,java示例程序,小程序示例等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
public bool IsAdministrator()
{
WindowsIdentity current = WindowsIdentity.GetCurrent();
WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);
return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
}
</div>
</div>

