Question : trim string

i need to trim off everything from the space to the end; example of string:

1310 ^*ka_+jdfkajsdkfj

need it to be

1310

Answer : trim string

string str = 1310 "^*ka_+jdfkajsdkfj";

str = str.Remove(str.IndexOf(" "));
Random Solutions  
 
programming4us programming4us