7
Reply

Erase stuff from string

Raul Junc

Raul Junc

Mar 21 2011 7:01 PM
2.2k
Hello
I have this code:

string s;
s = "12345       ";

How can i delete that space from my string?
I want to obtain true from this if:

if(s == "12345")
        MessageBox.Show("It's correct!");
else
        MessageBox.Show("Wrong");


Answers (7)