Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long string variable with embedded quote
Message
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:
01568403
Views:
27
>>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.
>
>You could just embed the string into a resource, then load the string from there. Or, load it into a text file and read it in.

Right, but I wanted to test an invoke string as is and that string is part of the invoke string. Anyway, I already used double quote.

Now I'm wondering if there is something to make sure directory ends with a slash in C# ?

Looks like Path.Combine is what I am after

http://www.dotnetperls.com/path
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