How to check if the current user is administrator ~ Don't Call Us - We'll Call You

Tuesday, March 3, 2009

How to check if the current user is administrator

bool isAdmin = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);

No comments:

Post a Comment