README.md
December 5, 2022 ยท View on GitHub
Description
Simple example on how to retrieve your local machines IP Address in VB.Net using the Frameworks Sockets.
More Info
Returns your IP Address!
| Submitted On | |
| By | Brian S. Smith |
| Level | Beginner |
| User Rating | 4.3 (13 globes from 3 users) |
| Compatibility | VB.NET |
| Category | Internet/ Browsers/ HTML |
| World | .Net (C#, VB.net) |
| Archive File |
Source Code
'Be sure to import these into your Class/Struct
Imports System.Net
Imports System.Net.Sockets
'Simple 2 lines and you have your IP address.
Dim objIPAddress As New IPAddress(Dns.GetHostByName(Dns.GetHostName).AddressList(0).Address)
Dim strIPAddress As String = objIPAddress.ToString