By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

Spilt IP:Port to 2 strings.

P: n/a
Hey,

How can I spilt a string like this: 216.240.148.110:27970 into 2 strings at
the ':' sign? (An IP, and a Port)
Ex: After the splitting occurs, string1 = 216.240.148.110, and String2 =
27970.

thanks
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Use String.Split()

Dim res As String()
Dim val As String = "216.240.148.110:27970"
res = val.Split (":")
' res(0) - IP; res(1) - Port#

"Donald Smith" <St**************@COx.net> wrote in message
news:tVEKc.1467$ci.851@lakeread04...
Hey,

How can I spilt a string like this: 216.240.148.110:27970 into 2 strings at
the ':' sign? (An IP, and a Port)
Ex: After the splitting occurs, string1 = 216.240.148.110, and String2 =
27970.

thanks

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.