Click here to Skip to main content
15,905,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I have a little problem

in textbox I have this numbers

,1,,2,,4,,6,,8,

exactly like I have written it
and I want to remove ,2, so that

,1,,4,,6,,8, stays in textbox

but thru code
not by selection

I have tried textbox.Text = textbox.Text.Remove(",2,");


but its not good

any help please
Posted

1 solution

I don't know what is your purpose with all this, but use String.Replace[^].
C#
textbox.Text = textbox.Text.Replace(",2,",string.Empty);
 
Share this answer
 
Comments
shonezi 13-Apr-13 16:41pm    
thank you :)
Maciej Los 13-Apr-13 16:46pm    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900