AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Vb.net get local pc name without dns9/18/2023 Net code snippet gets the array of all the IPAddress objects. Console.WriteLine("Local computer IP address : " & GetLocalIP()) Here is a simple example showing how to use above function (GetLocalIP) to display local machine IP address. ' InterNetwork indicates that an IP version 4 address is expected ' IPAddress class contains the address of a computer on an IP network.įor Each _IPAddress As In _IPHostEntry.AddressList ' IPHostEntry - Provides a container class for Internet host address information.ĭim _IPHostEntry As = (()) ' Resolves a host name or IP address to an IPHostEntry instance. ''' Gets IP addresses of the local computer Modify the exception handling section to meet your project requirements. This function uses System.Net namespace to get local machine hostname and then get a array of IPAddress objects. Net Visual Basic code snippet get the IP address from the local machine. Visual Basic Code Snippet - Get local computer IP address
0 Comments
Read More
Leave a Reply. |