locked
console.writeline() RRS feed

  • Question

  • TechNoGeek wrote a section of code in my last thread that contained the console.writeline() method.  I looked this up on MSDN, and I still have no idea what this method does.  Can somebody please explain what this is doing?

    Thanks!!
    Jeff
     For Each picB In picBoxes  
             Console.WriteLine(picB.Name)  
          Next 
    Sunday, June 29, 2008 4:23 PM

Answers

  • Console.WriteLine() is shared  (VB) or static (C#) function it used in a Console Applications Like dos commands and writes to the screen in your case to display names. and after it writes it prepares the next output to be in a newline

    In the file menu press new project and then select Console Application
    and type in the main method

    Console.WriteLine("Hello")

    then press ctrl F5
    Zaben
    Sunday, June 29, 2008 4:57 PM
  • when you run your app in debug mode at the bottom of the code window you will get some new tabs Locals, Autos, Watch, Output and what-not

    Console.writeline writes text to the debug window in the output tab
    Sunday, June 29, 2008 4:58 PM

All replies

  • Console.WriteLine() is shared  (VB) or static (C#) function it used in a Console Applications Like dos commands and writes to the screen in your case to display names. and after it writes it prepares the next output to be in a newline

    In the file menu press new project and then select Console Application
    and type in the main method

    Console.WriteLine("Hello")

    then press ctrl F5
    Zaben
    Sunday, June 29, 2008 4:57 PM
  • when you run your app in debug mode at the bottom of the code window you will get some new tabs Locals, Autos, Watch, Output and what-not

    Console.writeline writes text to the debug window in the output tab
    Sunday, June 29, 2008 4:58 PM