Finding Hostname
using System;
using System.Net;
class NetworkBasics
{
public static void Main(string[] args)
{
string name = Dns.GetHostName(); // Returns the name of the local machine
Console.WriteLine(name);
Console.ReadLine();
}
}
Output:
Admin-PC