Results 1 to 2 of 2

Thread: [2.0] putting " in a multiline?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    [2.0] putting " in a multiline?

    well I am using @"" to do a multi-line string in the IDE but the problem is that the next " ends it. Is there a way around this because I rather not edit a huge ass string to allow " by using \".

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] putting " in a multiline?

    In a verbatim string literal, i.e. one prefixed with an '@' symbol, you can escape double-quotes the same way you do in VB, i.e. with another double quote, e.g.
    C# Code:
    1. MessageBox.Show(@"He said ""Hello"" to me.");
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width