Small Help In C#

07/07/2012 03:08 badguy4you#1
i have sting like this 5000/10000

so i want the program to read the 5000 and store it into variable and when see the / exclude it and read the 10000 and store it to variable 2

how could i do that
07/07/2012 04:11 MoepMeep#2
Split at / ;o
07/07/2012 04:15 badguy4you#3
lol the real prob is that i want to save result 1 in a variable alone and result 2 in other variable

when i try to do that i get the variables with only result 2 ( i think cuz of foreach word in words)
07/07/2012 12:24 MoepMeep#4
Code:
String[] ret = string.Split('/');
int result1 = ConvertToInt(ret[0]);
int result2 = ConvertToInt(ret[2]);
Must be magic!
07/07/2012 14:00 MrSm!th#5
#moved

Quote:
String[] ret = string.Split('/');
int result1 = ConvertToInt(ret[0]);
int result2 = ConvertToInt(ret[2]);
The index for result2 should be 1 and not 2.
07/07/2012 18:53 MoepMeep#6
Quote:
Originally Posted by MrSm!th View Post
#moved

The index for result2 should be 1 and not 2.
u dont say?

So langsam solltest du wissen, dass es bei mir kein spoonfeeding gibt.