For Programmers: Free Programming Magazines  


Home > Archive > Visual Studio > January 2006 > use Equals method for comparison.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author use Equals method for comparison.
supra

2006-01-31, 7:03 pm

I got error, but i do not understand what is mean "use Equals method for comparison."
'Public Property Address() As Long' is obsolete: 'IPAddress.Address is address family dependant, use Equals method for comparison.'

Option Explicit On
Option Strict Off

Imports WIN = System
Imports SOCK = System.Net
Imports NetSocket = System.Net.Sockets

Public Sub Connect(ByVal Remotehost As String, ByVal Remoteport As Integer)
Dim lep As SOCK.IPEndPoint
Dim rep As SOCK.IPEndPoint
lep = New SOCK.IPEndPoint(SOCK.IPAddress.Any, 0)
Try
rep = New SOCK.IPEndPoint(SOCK.Dns.Resolve(Remotehost).AddressList(0).Address, Remoteport) ==> error occured
"SOCK.Dns.Resolve(Remotehost).AddressList(0).Address,
Connect(lep, rep)
Catch ex As Exception
ErrorCatched(ex)
End Try
End Sub

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com