• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2135
  • Last Modified:

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

To display a quote character (") in a string, which of the following methods should be used?
0
mathieu_cupryk
Asked:
mathieu_cupryk
  • 2
1 Solution
 
ozymandiasCommented:
Are you doing some kind of test ?

Where is the rest of this question ?
0
 
mathieu_cuprykAuthor Commented:
no
\"
 
 
--------------------------------------------------------------------------------
 
  """
 
 
--------------------------------------------------------------------------------
 
  //"
 
 
--------------------------------------------------------------------------------
 
  Chr(64);
0
 
ozymandiasCommented:
\" is the cotrrect answer
0
 
Fernando SotoRetiredCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now