how to print "" in c#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 205
Reputation: carobee is an unknown quantity at this point 
Solved Threads: 11
carobee carobee is offline Offline
Posting Whiz in Training

how to print "" in c#

 
0
  #1
Dec 2nd, 2008
hi,

how to print "" in c#?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: how to print "" in c#

 
0
  #2
Dec 2nd, 2008
put a \ in front of it, so rather than

"this is a "test""

which doesnt work

its

"this is a \"test\""
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: how to print "" in c#

 
0
  #3
Dec 2nd, 2008
agree with lizr, a lot of times to make the code a little cleaner i would make a constant

  1. const string quote = "\"";
  2. string sample = "This is a " + quote + "test" + quote;
Last edited by dickersonka; Dec 2nd, 2008 at 9:45 am.
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC