You are on page 1of 1

private bool isAdministrator() { WindowsIdentity WinIdentity = WindowsIdentity.GetCurrent(); WindowsPrincipal WinPrincipal = new WindowsPrincipal(WinIdentity); return WinPrincipal.IsInRole (WindowsBuiltInRole.

Administrator); }

You might also like