c# - how to deal with quotes in a string when passing that string to the command line -


I can not find my head around quotation marks.

EG, I have a string for MP3 with quotation marks:

  string ARTIT = "John" The Man \ "Do"  < / Pre> 

Then I want to give it on a command line to avoid scenes. So I need my string (I think):

  ARTIT = "John \\\" the man \\ "doo"  

then It seems, every time I have my string (actual) ", I need \" .

I have tried:

  ARTIST.Replace ("\" "," \\\ "")  

but It is not working. What is the correct way to handle quotes on the command line in my application?

Be sure you are:

  ARTIST = ARTIST . Replace ("\" "," \\\ "");  

Instead of:

  ARTIST.Replace ("\" "," \\\ "");  

Is this already the case?


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -