Home > DeveloperSection > Forums > How to get the Current user login in C#?
Mark Devid
Mark Devid

Total Post:102

Points:714
Posted on    June-12-2013 5:27 AM

 C# C# 
Ratings:


 1 Reply(s)
 975  View(s)
Rate this:
Hiii Experts!
I need to get the Current user login in C# please help me.


Vijay Shukla

Total Post:100

Points:700
Posted on    June-12-2013 7:33 AM

Hello Mark!

I give you below line of code which is provide Current user login in C#: -

namespace ConsoleApplication1

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine(System.Security.Principal.WindowsIdentity.GetCurrent().Name);

            Console.ReadKey();

        }

    }

}


Modified On Jun-12-2013 07:34:42 AM

Don't want to miss updates? Please click the below button!

Follow MindStick