How to obtain Current Machine Name in .NET

Waqas Anwar
16 July 2009
7380 Views

If you want to know the machine name on which your .NET application is running you can use MachineName property of Environment class.

Console.WriteLine(Environment.MachineName);