Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have string variable in c#

string str = "mazloomian\ddd";

i wrote that but it has error, how should i write this command?
Posted

1 solution

Try any one of them:
C#
string str = "mazloomian\\ddd";
// OR - both are fine   

string str = @"mazloomian\ddd";
 
Share this answer
 
v3
Comments
raju melveetilpurayil 4-Sep-10 6:03am    
Reason for my vote of 5
correct ;P
Per Söderlund 6-Sep-10 6:14am    
Reason for my vote of 5
Agree the @ takes care of it.

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