Solved

To display a quote character (") in a string, which of the following methods should be used?

Posted on 2006-11-06
4
2,040 Views
Last Modified: 2012-06-27
To display a quote character (") in a string, which of the following methods should be used?
0
Comment
Question by:mathieu_cupryk
  • 2
4 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 17884822
Are you doing some kind of test ?

Where is the rest of this question ?
0
 

Author Comment

by:mathieu_cupryk
ID: 17884840
no
\"
 
 
--------------------------------------------------------------------------------
 
  """
 
 
--------------------------------------------------------------------------------
 
  //"
 
 
--------------------------------------------------------------------------------
 
  Chr(64);
0
 
LVL 15

Accepted Solution

by:
ozymandias earned 250 total points
ID: 17884868
\" is the cotrrect answer
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 17884876
Hi mathieu_cupryk;

To have a " in a string just escape it like in the following line of code.

    string str = "this is a string with a \" character in it";

Fernando
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now