[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 414
  • Last Modified:

C# doesn't support "here documents?"

It looks like C# doesn't support here documents???

(Embedded text like one can do in other programming languages like Perl and Ruby.)

    http://en.wikipedia.org/wiki/Here_document

Is the best workaround perhaps to store the text in files and read into memory at run-time?

What is the best practice for C# since it doesn't support here documents?
0
ZuZuPetals
Asked:
ZuZuPetals
1 Solution
 
lazyberezovskyCommented:
No, C# does not support heredocs.
You can use @ - verbatim string literal. It does not apply any interpretations to characters until the next quote character is reached. So, you can create text with symbols like \
E.g. @"Here is
some text
with \
"
0
 
RyanAndresCommented:
Are you trying to execute msdos command line statements within your app?
0
 
ZuZuPetalsAuthor Commented:
No MS Dos, just embedded XML that I need to assemble and send via HTTP.<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now