HOW TO GET THE CURRENT USER LOGIN IN C#?

Total Post:102

Points:714
C# 
C#
 1466  View(s)
Ratings:
Rate this:
Hiii Experts!
I need to get the Current user login in C# please help me.
  1. 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 Mar-30-2018 01:56:42 AM

Answer

NEWSLETTER

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