Noodle/MainWindow.xaml.cs
/// <summary>
/// The function checks whether the current process is run as administrator.
/// In other words, it dictates whether the primary access token of the 
/// process belongs to user account that is a member of the local 
/// Administrators group and it is elevated.
/// </summary>
/// <returns>
/// Returns true if the primary access token of the process belongs to user 
/// account that is a member of the local Administrators group and it is 
/// elevated. Returns false if the token does not.
/// </returns>
The function checks whether the current process is run as administrator.
In other words, it dictates whether the primary access token of the
process belongs to user account that is a member of the local
Administrators group and it is elevated.
The function checks whether the current process is run as administrator . In other words it dictates whether the primary access token of the process belongs to user account that is a member of the local Administrators group and it is elevated .
internal bool IsRunAsAdmin()
        {
            WindowsIdentity id = WindowsIdentity.GetCurrent();
            WindowsPrincipal principal = new WindowsPrincipal(id);
            return principal.IsInRole(WindowsBuiltInRole.Administrator);
        }
internal bool IsRunAsAdmin ( ) { WindowsIdentity id = WindowsIdentity . GetCurrent ( ) ; WindowsPrincipal principal = new WindowsPrincipal ( id ) ; return principal . IsInRole ( WindowsBuiltInRole . Administrator ) ; }
The function checks whether the current process is run as administrator.
The function checks whether the current process is run as administrator .
Returns true if the primary access token of the process belongs to user
account that is a member of the local Administrators group and it is
elevated. Returns false if the token does not.
Returns true if the primary access token of the process belongs to user account that is a member of the local Administrators group and it is elevated . Returns false if the token does not .