Checking for format in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

how can I check if a string in VB.NET has got the format of an IP address (e.g. 1.2.3.4)

Thanks a lo
mosquitooth
 
You can use IPAddress.Parse..you'll throw an exception if it's not valid.
The other option is to use a Regex or other parsing logic but that's more
complexity..
 
Back
Top