get system name in csharp

You can get the system name in C# by using the Environment class and accessing the MachineName property, like this:

main.cs
string systemName = Environment.MachineName;
Console.WriteLine("System name: " + systemName);
94 chars
3 lines

This will output the name of the current system.

gistlibby LogSnag