Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Something similar to text /endtext in C#
Message
De
13/04/2016 05:33:52
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01634710
Message ID:
01634730
Vues:
51
>>>Hi everybody,
>>>
>>>I'm trying to pass a string that contains lots of low ascii characters and ''. This is actually a content of the photo. I'd like to create a test, but I can not embed this string in my code in C# even after I tried escaping " with \.
>>>
>>>What should I do to be able to pass that photo as is?
>>>
>>>Thanks in advance.
>>
>>Where are you getting the string from?
>>
>>When I need to access a string with odd characters that would disturb the compiler repeatedly, I put it in an .xml file and read it.
>
>The string will come from C++ application. Right now I want to simulate a test of such string.

IIRC, a C++ string is a byte array. You could try:
string s = Convert.ToBase64String(cplusstring);
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform