7
Answers

Erase stuff from string

Raul Junc

Raul Junc

13y
2.2k
1
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)