question

Durga Ghosal avatar image
0 Likes"
Durga Ghosal asked Matthew Gillespie answered

How to write double quotes " to a text file

Choose One
output
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

You need to put a backslash in front of the quotes. The backslash is an escape character that indicates that the next character should be interpreted differently.

So if you want to print a string with " in it you'd do something like this:

string text = "My name is \"Bob\"";
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.