CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2002
    Posts
    2

    how to find the current system date and login accout of the lcoal computer?

    In C#.
    Thanks for the help
    Chris


  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    265

    Re: how to find the current system date and login accout of the lcoal computer?

    DateTime.Now for the current system time.

    The world holds two classes of men -- intelligent men without religion, and religious men without intelligence. Abu'l-Ala-Al-Ma'arri (973-1057; Syrian poet)

  3. #3
    Join Date
    Mar 2002
    Posts
    174

    Re: how to find the current system date and login accout of the lcoal computer?


    using System;
    using System.Security.Principal;

    namespace ConsoleApplication1
    {
    class Class1
    {
    static void Main(string[] args)
    {
    WindowsIdentity wi=WindowsIdentity.GetCurrent();
    Console.WriteLine(wi.Name);
    }
    }
    }



    Good luck
    Please rate if you think this response was useful for you.
    Have more questions?


  4. #4
    Join Date
    Mar 2002
    Posts
    2

    Re: how to find the current system date and login accout of the lcoal computer?

    thanks for the help.
    I got it.

    Chris


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured