Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long string variable with embedded quote
Message
 
 
To
14/03/2013 11:24:24
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01568373
Message ID:
01568380
Views:
38
>>Hi everybody,
>>
>>I have some text which I'd like to use as a string variable in my tests. This text has many embedded double quotes. I checked that I can escape the double quote by doubling it and that's what I plan to do, but wondering if there is another more elegant solution?
>>
>>Thanks in advance.
>
>
>Use another char for the double quote. Then replace()
>
>
>string Input = @"^wordOne^ and ^wordtwo^".Replace('^', '"');
>
This is no better than simply doubling the double quote.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform