current Windows NT User - CSharp Operating System

CSharp examples for Operating System:Windows

Description

current Windows NT User

Demo Code


using System.Web;
using System.Security.Principal;
using System.Linq;
using System.Collections.Generic;
using System;//from ww  w . ja  v a2 s  . c o  m

public class Main{
        public static string currentNTUser()
        {
            myuser = WindowsIdentity.GetCurrent().Name;
            return myuser;
        }
}

Related Tutorials