I have to create a string that contains inverted commas inside it.
How can i do that in c#?
As follows:-
"AT+CMGF=1"
string temp=""AT+CMGF=1""; // not valid
weird0 wrote:
> I have to create a string that contains inverted commas inside it.
> How can i do that in c#?
> As follows:-
> "AT+CMGF=1"
> string temp=""AT+CMGF=1""; // not valid
I've never heard them called inverted commas before. Usually those are
called quotation marks when found in pairs like that. Since the
quotation mark is the string begin/end character in C#, you need to
escape them to embed them in a string. Ex:
string temp = "\"AT+CMGF=1\"";
--
Tom Porterfield
-----------------------------------------------Reply-----------------------------------------------
Regular quote characters?
string temp="\"AT+CMGF=1\"";
or
string temp=@"""AT+CMGF=1""";
Marc