Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Something similar to text /endtext in C#
Message
From
13/04/2016 05:33:52
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01634710
Message ID:
01634730
Views:
52
>>>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);
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform