Results 1 to 3 of 3

Thread: Quotes - How to put them in to display?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Quotes - How to put them in to display?

    I want to display this line inclucing the quote marks:

    "Hello world"

    I do I include the quote marks?

    Simple I am sure, but I am new.

    Thanks!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You have to escape the characters. Try this

    Code:
    label1.Text = "\"Hello World\"";

  3. #3
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,614
    Just to throw out an alternative, you can also do:

    Code:
    Console.WriteLine(@"""Hello World""");

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