Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long string variable with embedded quote
Message
 
 
À
14/03/2013 12:48:12
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01568373
Message ID:
01568393
Vues:
33
>>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.
>
>Naomi, I don't know about quotes, but I put strings with slashes (instead of double slashes) in the them in my app.config and call them when I need them.
>I wonder if that would work for quotes?

I think I read in the comments to that blog I checked that slashes will also work. But I think I opted for doubling the quote. I do it in VFP with _cliptext then will post back into C#. Since I was re-starting my computer all the time I haven't done it yet, but I am very close.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform