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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top