Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
06-15-2011, 02:01 AM #1
This is probably the wrong forum for this; but asp.net is not specifically C# and it relates to connecting to my server and there is usually not too much traffic on the asp.net page...
my question. In setting up my connection string for my DB there is an instance of "COMPUTERNAME\Dstuff" which C# recognizes as an escape (\D) sequence.
Does anyone know the proper way to display the \D as literally \D and not an escape? I tried using ' around it- I also thought there was a trick with @... I'm stuck
06-15-2011, 09:13 AM #2
- Join Date
- Mar 2007
- Thanked 2,223 Times in 2,210 Posts
- Blog Entries
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
Users who have thanked abduraooft for this post:
06-15-2011, 09:08 PM #3
for any interested if you have a \b (or some other escape/expression) yo can make the compiler see it as literal bu placeing @ before it; so eg if I have string blah= "\n bingo";
and I do not want the compiler to recognize \n as "new line"
you would phrase it
string blah: @"\n bingo";
... again- not sure this should be in here; but nice to know the info about SQL having escapes/expression paths as well)