Click here to Skip to main content
15,915,869 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
dear friends
i have input a word as(ompra???h111) in TextBox.text .
and how to remove in charecter (???) in this string.
pls give me solutions.
Posted

If this is your only requirement, then you can try this.
C#
string s = "ompra???h111";
string t = s.Replace("???", "");


If you can have various amount of ? characters this is a more robust approach.
C#
string s = "ompra???h111";
string t = s.Replace("?", "");
 
Share this answer
 
Comments
BillWoodruff 15-Sep-14 4:01am    
Exactly right +5
George Jonsson 15-Sep-14 4:19am    
Thanks.
C#
string your_string= "ompra???h111";
string resulting_string= your_string.Replace("???", string.Empty);

Is it that difficult? Atleast try something your self first.

Regards..
 
Share this answer
 
v3
Comments
td sbi 15-Sep-14 6:23am    
thanks
C#
textBox1.Text = textBox1.Text.Replace("?",string.Empty);
 
Share this answer
 
well a string is an array of chars that you can loop trough so you can try to find out the chars you want to remove somehow and google for ways to do that.
instead of just asking us to give you code.
btw there is msdn documentation on your question.
 
Share this answer
 

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