Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

Creating a string that contains inverted commas inside it


  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

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc