VB translation...
Imports System
Imports System.Net
Friend Class Test
Public Shared Sub Main()
Dim a() As IPAddress =
Dns.GetHostByName(Dns.GetHostName()).AddressList
For i As Integer = 0 To a.Length
Console.WriteLine("IP Address [" & i.ToString & "] = " &
a(i).ToString)
Next
End Sub
End Class
Just in case the OP doesn't speak C [and yes.. I'm bored :P]
_______________________________________________
The Grim Reaper
"mos2128" <mo*****@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
using System;
using System.Net;
class Test {
public static void Main() {
IPAddress[] a = Dns.GetHostByName(Dns.GetHostName()).AddressList;
for (int i=0; i<a.Length; i++)
Console.WriteLine ("IpAddr[{0}]={1}",i,a[i]); }
}
hope this may help
--
Happy Coding
Muhanad YOUNIS
MCSD.NET / MCT
http://myounis.blogspirit.com
Be the first to know visit http://www.jordev.net
"RonB" wrote:
This should be easy to do, however I can't seem to figure it out. How can
I
find the IP of my machine using .NET
thanks,
Ron