Results 1 to 5 of 5

Thread: "Hello C-Sharp!" question

  1. #1

    Thread Starter
    Member AMDPwred's Avatar
    Join Date
    Mar 2002
    Location
    Richmond, VA
    Posts
    48

    "Hello C-Sharp!" question

    I'm just poking around in C# and I just wrote the classic Hello < insert new lang here > program. It will run in the console, then exit fast. Doesn't give me a second to read the text. I remember having this issue when I poked around in C some, but I can't remember what I did to get around it.

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    put Console.Readline(); below "hello world";
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Member AMDPwred's Avatar
    Join Date
    Mar 2002
    Location
    Richmond, VA
    Posts
    48
    Thanks.

    Code:
    using System;
    
    class HelloWorld {
    	static void Main() {
    		Console.WriteLine("Hello C#!");
    		Console.ReadLine();
    	}
    }

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Also i believe you can add

    while (false)
    {
    }
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    dmartin17
    Guest
    If you are using the .net studio you can run it by using ctrl+f5 (as opposed to just f5) that will leave the dos window open for you.

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