Anthony wrote:
How do people normally handle a long text string that you create in code
This is what i normally do but was hoping this is an obsolete
technique? I hate having to esacpe the characters eg the double quotes
within the quotes!
POAck.AppendLine("<?xml version=""1.0""
encoding=""UTF-8""?>")
POAck.AppendLine("<!DOCTYPE cXML SYSTEM
""http://xml.cXML.org/schemas/cXML/1.2.009/cXML.dtd"">")
POAck.AppendLine("<cXML payloadID=""" & Payloadid &
""" timestamp=""" & TimeStamp & """ xml:lang=""en-US"">")
POAck.AppendLine("<Response>")
POAck.AppendLine("<Status code=""200""
text=""Successful received purchase order..thank you""/>")
POAck.AppendLine("</Response>")
POAck.AppendLine("</cXML>")
regards
Anthony (*12QWERNB*)
Hi Anthony,
I usually...
[C#]
string multiline = "deerppppppppppppppppppppppppppppppppppppppp " +
"derp derp derp herp herp herp derp derp derp herp herp herp derp
derp derp herp herp herp " +
"rabble rabble rabble rabble rabble rabble rabble rabble rabble
rabble rabble rabble rabble rabble";
with {\"} for quotation if used.
It looks like your example is VB...
dim multiline as string = "deerppppppppppppppppppppppppppppppppppppppp " & _
"derp derp derp herp herp herp derp derp derp herp herp herp derp
derp derp herp herp herp " & _
"rabble rabble rabble rabble rabble rabble rabble rabble rabble
rabble rabble rabble rabble rabble";
I don't think you can avoid the multiple quotes ("") in .NET. In PHP,
you can use single quotes for strings, then happily use double quotes
inside, I have no idea what .NET does about this, if anything. (Anyone
else in the know?)
Herp herp derp,
--
Les Hughes
[email protected]