HOW TO GET THE CURRENT USER LOGIN IN C#?

Mark Devid

Total Post:102

Points:714
Posted by  Mark Devid
C# 
C#
 1221  View(s)
Ratings:
Rate this:
Hiii Experts!
I need to get the Current user login in C# please help me.
  1. Vijay Shukla

    Post:100

    Points:700
    Re: How to get the Current user login in C#?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!