Initializes a new instance of the DnsClient class.
The following example demonstrates creating an instance of the DnsClient class object and resolving a hostname into an Internet address using the Resolve method.
[Visual Basic]
Dim dnsClient As SocketTools.DnsClient
Dim strHostName As String
Dim strHostAddress As String
dnsClient = New SocketTools.DnsClient
strHostName = TextBox1.Text.Trim()
If dnsClient.Resolve(strHostName, strHostAddress) Then
StatusBar1.Text = "The Internet address for " + strHostName + " is " + strHostAddress
Else
StatusBar1.Text = "The Internet address for " + strHostName + " could not be resolved"
End If
DnsClient Class | SocketTools Namespace