Network C# Tutorial

using System;
using System.Net;
class MainClass
{
    public static void Main()
    {
        IPHostEntry ihe = Dns.GetHostByName(Dns.GetHostName());
      IPAddress myself = ihe.AddressList[0];
        Console.WriteLine(myself);
    }
}
192.168.1.101