Remove a string in string
Hi everybody,I have a string text="-52-53-54-55-57-58-".I want to remove string "-53" to new string is "-52-54-55-57-58-".I used a function text.Remove(4,3).But error.Can you help me?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Suthish NairRank #92 · 22.8K reputationPosted Nov 7, 2010, 10:22 PM EST
string text = "-52-53-54-55-57-58-"; text = text.Replace("-53", "");Posted Nov 7, 2010, 6:43 PM EST
string s = "-52-53-54-55-57-58-";
s = s.Remove(3, 3);
The above code is working...
s = "-52-54-55-57-58-".
Moreover, what is the error that you are getting....
toanhoi bui70 reputationPosted Nov 8, 2010, 6:48 PM EST
string text = "-52-53-54-55-57-58-"; text = text.Replace("-53", ""); Thanks you very much.Suthish NairRank #92 · 22.8K reputationPosted Nov 8, 2010, 7:20 PM EST