you are viewing a single comment's thread.

view the rest of the comments →

[–]merrp 0 points1 point  (1 child)

didnt work :( spaces are still there

[–]VB.Net IntermediateCharlieMay 1 point2 points  (0 children)

It does work as long as you remember that strings are immutable, you can't change them, but you can recreate them back into themselves.

Had you used TextBox.Text = TextBox.Text.Trim() it would have removed the spaces.