Running a C# app from the cmd window

  • Thread starter Thread starter Steve Le Monnier
  • Start date Start date
S

Steve Le Monnier

Quick question, I've designed an app to be run from the command window, and
am trying to output a message to the command window if the incorrect number
of parameters are passed.

I've used console.writeline but nothing appears in the command window.

How do I get a C# app to write a message to the command window? I do not
want to use MessageBox.

Cheers

Steve Le Monnier
 
Hi Steve,

How are you running your app? If it's a console app, navigate to it via
the command window and run it instead of executing it by double
clicking. You may try compiling it via the command window as well (I
find it's helpful to learn C# that way instead of always relying on an
IDE).

HTH,

Chris
 
Hi.

Are your application type set to Console Application? (Project
properties --> Common Properties --> General --> Output Type). I'm not
sure it matters at all, but Console.WriteLine(..) is the correct way to
write to the command window as far as I know.

Halvard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top