Reputation: 921
I have a big string, precisely - an XSLT code - that I would like to hardcode in my VB.net program. I tried with putting "
before every quotation mark, but it still didn't work out, and it's pretty mocking to place it 100 times. Using Chr(34)
is also not the best solution.
Is there some way, like to put @
(or another character) before the string itself that will define and work for all the characters in the string that need to be escaped ?
Upvotes: 0
Views: 265
Reputation: 27322
If it is a large string. Why not save it to file and then read the file into memory before you want to use it. That way you don't have to do any escaping and it will be easy to modify if you decide to change it.
Upvotes: 1