Solved

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

Posted on 2006-11-06
4
2,050 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 63

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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