namespace IpAddresses
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
class Program
{
static void Main(string[] args)
{
GetIPAddresses().ForEach(ip => Console.WriteLine(ip));
}
static List<string> GetIPAddresses()
{
return Dns.GetHostAddresses(Dns.GetHostName()).Select(ipAddress => ipAddress.ToString()).ToList<string>();
}
}
}
:)