In code, you can do this:

using System;
using System.Net;

namespace Test
{
      public class TestClass
      {
            public static void Main()
            {
                  IPAddress address =
Dns.GetHostByName(Dns.GetHostName()).AddressList[0];
                  Console.WriteLine(address.ToString());
            }
      }
}

-Brian

-----Original Message-----
From: Chinh Tran [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2010 5:59 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [C#.NET] How to get dynamic IP

Hi all,

My computer is connected to internet by ADSL.

When my modem turn on, ISP will provide a IP ( dynamic IP) for me

I want to know how to get the IP?

Please help me.

Thanks

Chinh Tran


Yahoo! Groups Sponsor

Get unlimited calls to

U.S./Canada

Web Bug from http://view.atdmt.com/VON/view/yhxxxvon01900091von/direct/01/&time=1098962109461587
Web Bug from http://us.adserver.yahoo.com/l?M=281955.5530326.6602771.3001176/D=groups/S=:HM/A=2343726/rand=982205049


Yahoo! Groups Links

Reply via email to