parenthesis in a string
-
How the crap do I put a parenthesis in a string in C#??? I want to do this...
string asdf="(";
/\ |_ E X E GG -
Why not try before you ask? That is exactly how you do it. There is nothing special about having a paranthesis in a string. It's just like any other character. --- b { font-weight: normal; }
-
How the crap do I put a parenthesis in a string in C#??? I want to do this...
string asdf="(";
/\ |_ E X E GGMust be something else you are doing. That should work. The only tricky character is the backslash. It is the escape character for non-printing and control characters, so you have strange constructions like: string abcd = "\"\\\""; That translates to a string containing double-quote backslash double-quote.
-
String asdf = "("; Same escape sequence rules in C, C++, C#, and Java.