I have this string :
string resultString="section[]=100§ion[]=200§ion[]=300§ion[]=400";
I just want the numbers to be stored in the array result[] like
result[0]=100
result[1]=200
result[3]=300
result[4]=400
Can anyone help me with this.
NameValueCollection values = HttpUtility.ParseQueryString("section[]=100§ion[]=200§ion[]=300§ion[]=400");
string[] result = values["section[]"].Split(',');
// at this stage
// result[0] = "100"
// result[1] = "200"
// result[2] = "300"
// result[3] = "400"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With