DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   how to print "" in c# (http://www.daniweb.com/forums/thread160370.html)

carobee Dec 2nd, 2008 2:01 am
how to print "" in c#
 
hi,

how to print "" in c#?

LizR Dec 2nd, 2008 3:10 am
Re: how to print "" in c#
 
put a \ in front of it, so rather than

"this is a "test""

which doesnt work

its

"this is a \"test\""

dickersonka Dec 2nd, 2008 9:44 am
Re: how to print "" in c#
 
agree with lizr, a lot of times to make the code a little cleaner i would make a constant

const string quote = "\"";
string sample =  "This is a " + quote + "test" + quote;


All times are GMT -4. The time now is 12:55 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC