|
-
April 8th, 2008, 09:20 PM
#1
How To Split A String?
Im currently working on a C# project that requires the use of proxies.
Code:
String WholeProxy = "127.0.0.1:80";
String Address = Here I need to split "WholeProxy" to get just the "127.0.0.1";
int Port = Here I need to split "WholeProxy" to get just the "80";
WebProxy WP = new WebProxy(Address,Port);
Does anyone know how to do this?
Thanks,
BuckleyInDaHouse.
-
April 8th, 2008, 11:05 PM
#2
Re: How To Split A String?
Code:
string[] AddressAndPort = WholeProxy.Split(new Char[] { ':' });
string Address = AddressAndPort[0];
int Port = Convert.ToInt32(AddressAndPort[1]);
-
April 9th, 2008, 05:08 AM
#3
Re: How To Split A String?
Wow, thank you so much. This fixed my problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|