System Net C# by API

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