Click here to Skip to main content
15,904,653 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi How I can replace commas in c#.... ex

I have text "codeproject" and I want to text only codeproject

I tried with string.replace(""","") but doesn't work
Posted
Comments
Sergey Alexandrovich Kryukov 29-Apr-12 19:07pm    
Reason for my vote of 1
Doesn't work is not a valid explanation. If fact, this is off-topic.

Want to know why? Because this forum is for software developers and student. Software developers never say "it doesn't work", they know that it is important to provide accurate issue report.

--SA
asp.net4.50 10-May-13 7:45am    
how to insert in database "textincluding double quotes" , this i have to enter in textbox and it should store in db , here my code is in c#

1 solution

"but doesn't work" is still not a helpful description.

use
C#
string.Replace("\"","")


If your desire is to replace commas, which do not exist in your string, then you would
C#
string.replace(",","")
 
Share this answer
 
v2
Comments
h7h7h7 29-Apr-12 16:25pm    
Thnx Wes, you always criticize me for bad description :D...thnx man
Sergey Alexandrovich Kryukov 29-Apr-12 19:09pm    
What stops you from making a good description?

Use the following "trick": write down a question, then forget that you have this question; try to imagine that you are the one who must to provide the answer. Ask yourself: can you understand the problem or not?
--SA
Maciej Los 29-Apr-12 16:26pm    
Good answer! My 5
I think, OP wants to remove quotation marks.
[no name] 29-Apr-12 18:28pm    
Thanks
Sergey Alexandrovich Kryukov 29-Apr-12 19:10pm    
Sure, a 5.
--SA

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