"
is an escape sequence character.
You need to escape it with \
like;
string example = "\"";
From Escape Sequences
Escape Sequence -- Represents
\" -- Double quotation mark
From Wikipedia
In many programming languages escape sequences are used in character
literals and string literals, to express characters which are not
printable or clash with the syntax of characters or strings. The
escape character is usually the backslash. For example the single
quotation mark character might be expressed as '\''
since writing
'''
is not acceptable.
As an alternative, you can use your string as a verbatim string literal.
From 2.4.4.5 String literals
A verbatim string literal consists of an @
character followed by a
double-quote character, zero or more characters, and a closing
double-quote character. A simple example is @"hello". In a verbatim
string literal, the characters between the delimiters are interpreted
verbatim, the only exception being a quote-escape-sequence.
string example = @""";