Click here to Skip to main content
15,919,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have this string
'"[SomeFolder]Microsoft.NET\Framework\start.exe" "abc.dll"'

i want to assign it to a string.
i want to keep both quotes (single and double in my string) i.e '" in beginning and end
Posted
Updated 23-May-12 9:24am
v2

Do you mean something like
C#
string s = "[SomeFolder]Microsoft.NET\\Framework\\start.exe\" \"abc.dll\"";

Alternative version
C#
string s = @"[SomeFolder]Microsoft.NET\Framework\start.exe"" ""abc.dll""";
 
Share this answer
 
v2
Comments
newbie_25 23-May-12 14:43pm    
ya but i am having problem in starting and end i.e '" ......... "'
newbie_25 23-May-12 14:44pm    
is it possible to use @" " with it??
Wendelius 23-May-12 14:52pm    
Surely, see the updated answer
newbie_25 23-May-12 14:54pm    
but i want '"(single quote and then double quotes) also in my string
Wendelius 23-May-12 14:58pm    
If you use @, the for each quote you want in your result, you must add two of them inside the string.
Think you got it just a little bit off:

string s = "\"[SomeFolder]Microsoft.NET\\Framework\\start.exe\" \"abc.dll\"";
 
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