Dns.GetHostName()
using System; using System.Net; class MainClass { public static void Main() { Console.WriteLine(Dns.GetHostName()); } }