Notice for the current user member of the Administrator user group C#

Notice for the current user whether the tone is a member of the Administrator user group or not to use this code

WindowsIdentity identity = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(identity);
string role = "BUILTIN\\Administrators";
bool IsAdmin = principal.IsInRole(role));