adding quotation marks to a string?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vince

    #1

    adding quotation marks to a string?

    need to create a string with embedded quotation marks,
    like

    string str1 = " they said "go away" ";

    How can this be done?

    Thanks,

    vince
  • Joe Mayo

    #2
    Re: adding quotation marks to a string?

    string str1 = " they said \"go away\" ";

    or

    string str1 = @" they said ""go away"" ";

    Joe
    --
    Learn C# with step-by-step tutorials and practical examples. Start your first program, explore lists and parsing, and understand how .NET runs your code.


    "vince" <vlusardi@cox.n et> wrote in message
    news:022201c36f 4d$33125430$a40 1280a@phx.gbl.. .[color=blue]
    > need to create a string with embedded quotation marks,
    > like
    >
    > string str1 = " they said "go away" ";
    >
    > How can this be done?
    >
    > Thanks,
    >
    > vince[/color]


    Comment

    Working...