find out whether current user is guest
Published: 14. October 2011 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Windows » Authorization
Tags: Authorization C# Windows
Code
var identity = WindowsIdentity.GetCurrent(); bool isGuest = identity.IsGuest;
Import namespace
using System.Security.Principal;
| Send us feedback about this snippet » |





