Convert Long IP to String IP

aahmed

New member
Joined
Aug 11, 2003
Messages
3
Greetings,

I have used the following code to get a remote machines IP Address:

dim pc as string
dim hostaddress as ipaddress

pc = pcname.text

hostaddress = Dns.Resolve(pc).AddressList(0)

Now I want to convert this IP Address to String, how could I do that? Im relatively new to this so any help would be appreciated.

Thanks.
 
To convert objects to string use the Convert class:
Code:
Dim stringip as String = Convert.ToString(Long value here)
 
Back
Top