How to get user name of logon windows user.

This Code shows how to get user name of log on windows user.

Here is the code :

C# Code 

string a;
a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();

NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

Popular posts from this blog

Example to disable save as certain file type in SSRS Report Viewer

Phone book application example - Java

Modal Popup Message Box ASP.NEt C# Example