How to start a C# project

8 views
Skip to first unread message

Clint

unread,
Jul 26, 2012, 4:53:47 PM7/26/12
to byu-cs-3...@googlegroups.com
This is a silly question, but I'm having trouble figuring out how to simply start a C# project that isn't a Windows Form Application.  There are about two dozen different options when I try to start a new project in visual studio.  I tried Console Application, but running the program seemed to open the console for a split second and then closes, and I couldn't figure out where to put output.  I assume I can just spit my answer out through Console.Writeline, right? 

Christopher Tensmeyer

unread,
Jul 26, 2012, 4:56:55 PM7/26/12
to byu-cs-3...@googlegroups.com

Use the console aplication.  The output window closes as soon as execution terminates.  Use Console.ReadLine() to pause execution after displaying your results.

Chris

On Jul 26, 2012 3:53 PM, "Clint" <rollin...@gmail.com> wrote:
This is a silly question, but I'm having trouble figuring out how to simply start a C# project that isn't a Windows Form Application.  There are about two dozen different options when I try to start a new project in visual studio.  I tried Console Application, but running the program seemed to open the console for a split second and then closes, and I couldn't figure out where to put output.  I assume I can just spit my answer out through Console.Writeline, right? 

--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/byu-cs-312-summer/-/9EkWsGb0pd8J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Paul Felt

unread,
Jul 26, 2012, 4:59:41 PM7/26/12
to byu-cs-3...@googlegroups.com
Good suggestion. Another option, if you are more comfortable with Windows Form Applications, is to make a drop-dead simple GUI. Just make a button that runs your code when you push it . . .

--Paul

Brad Spendlove

unread,
Jul 26, 2012, 5:00:02 PM7/26/12
to byu-cs-3...@googlegroups.com
static void pause()
{
    Console.WriteLine("Press any key to continue...");
    Console.ReadLine();
}

That should do it

Clint

unread,
Jul 26, 2012, 5:03:08 PM7/26/12
to byu-cs-3...@googlegroups.com
Got it.  Thanks!
Reply all
Reply to author
Forward
0 new messages