Results 1 to 2 of 2

Thread: simple printf question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    3

    simple printf question

    Hello

    is it possible to use the " character in a printf statment??

    thanks

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    C# doesn't have a printf()....It is the WriteLine() that you are wanting...and yes you can use the " in it, but you need to escape it with a \

    example
    Code:
    using System;
    
    Class myClass
    {
       public static void Main()
       {
          Console.WriteLine("This is a \"real\" test.");
       }   
    }
    it displays: This is a "real" test.
    Last edited by Memnoch1207; Jul 13th, 2003 at 08:46 PM.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

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