Articles in categories

Articles

Get UserName and machine

Get the logged in user - and machine name.

Console.WriteLine("Current Logged UserName: " + Environment.UserName);

Console.WriteLine("Local Machine Name: " + Environment.MachineName);

Console.WriteLine("Local Machine Name: " + Dns.GetHostName());