Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleGet the computer's DNS name in VB .NET
DescriptionThis example shows how to get the computer's DNS name in VB .NET. It uses the GetHostByName method to get information about "localhost."
KeywordsDNS, name, computer name, host name
CategoriesWindows, Miscellany
 
The program uses the System.Net.Dns.GetHostByName method to get information about the "host" named "localhost." It uses the returned object's HostName property.
 
lblDsnName.Text = _
    System.Net.Dns.GetHostByName("localhost").HostName
 
See the Knowledge Base article 302656 How To Obtain the NetBIOS and DNS Computer Names by Using VB.NET.
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated