abc @cnn("sujsl d(*) sfv @nor dsf ",dn,".",@tn); ator '`,`') sds
@cns1 or '`,"\','\",`') fdhg @cns2 sf \",dn,"; nj
How can I get this text as a string in C#. It can not be simply done due to containing " I would prefer to paste it, someway, as it is, rather than replcaing " with \" as my text already contains things like that
One way is, to paste it in a static text Box (textBox1) and then get it as Text of textbox (If I have to use this in a winform) e.g. string st = textBox1.Text
How this type of text can be got in a string variable without using a textBox?
This is a good case for resource files. They will allow you to enter string literals without having to worry about escaping of any kind and are available to you programmatically. See for reference http://msdn.microsoft.com/en-us/library/3xhwfctz(v=vs.100).aspx
Check out string literals, this may be what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With