PC Review


Reply
Thread Tools Rate Thread

Console.WriteLine Not Available

 
 
Jeff S
Guest
Posts: n/a
 
      27th Aug 2003
Whenever I execute any Console commands (Console.WriteLine "yada yada
yada"), the console does not appear. It doesn't even flash by.

I want to be able to use Console commands. Any ideas?

I'm running VS.NET 2003 on XP pro/SP1.


 
Reply With Quote
 
 
 
 
Tom Spink
Guest
Posts: n/a
 
      27th Aug 2003
You need to have created a Console Application, when you create your
project. You can change the type of project by going into your project's
properties.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit


"Jeff S" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Whenever I execute any Console commands (Console.WriteLine "yada yada
> yada"), the console does not appear. It doesn't even flash by.
>
> I want to be able to use Console commands. Any ideas?
>
> I'm running VS.NET 2003 on XP pro/SP1.
>
>



 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      27th Aug 2003
"Jeff S" <(E-Mail Removed)> schrieb
> Whenever I execute any Console commands (Console.WriteLine "yada
> yada yada"), the console does not appear. It doesn't even flash
> by.
>
> I want to be able to use Console commands. Any ideas?
>
> I'm running VS.NET 2003 on XP pro/SP1.


Did you choose "console application" as the project type? (see project's
properties)


--
Armin

 
Reply With Quote
 
Nak
Guest
Posts: n/a
 
      27th Aug 2003
> Whenever I execute any Console commands (Console.WriteLine "yada yada
> yada"), the console does not appear. It doesn't even flash by.


Look in the IDE's internal console (Output window) If it's not a console
application your developing it will appear in the debugger.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


 
Reply With Quote
 
Jeff S
Guest
Posts: n/a
 
      28th Aug 2003
Okay, the console window will appear for me if I'm working in a console
application.

So, does this mean that all those code snippets in online documentation that
include [Console.WriteLine] ALL assume that the user is developing a console
application? It just seems odd to me that there would be hundreds of code
snippets that make this assumption without telling the reader. Am I missing
something?

honestly wondering...



"Herfried K. Wagner [MVP]" <(E-Mail Removed)> wrote in message
news:e6#T$(E-Mail Removed)...
> Hello,
>
> "Jeff S" <(E-Mail Removed)> schrieb:
> > Whenever I execute any Console commands (Console.WriteLine "yada yada
> > yada"), the console does not appear. It doesn't even flash by.
> >
> > I want to be able to use Console commands. Any ideas?
> >
> > I'm running VS.NET 2003 on XP pro/SP1.

>
> Are you sure you created a project of type "Console Application"? If you
> want to create a new console from within a Windows Forms project, you can
> use the AllocConsole PInvoke call:
>
>

http://www.google.com/groups?as_q=Al...soft.public.do
tnet.*
>
> HTH,
> Herfried K. Wagner
> --
> MVP · VB Classic, VB .NET
> http://www.mvps.org/dotnet
>
>



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      28th Aug 2003
I have the same thoughts like you Jeff


 
Reply With Quote
 
Nak
Guest
Posts: n/a
 
      28th Aug 2003
> I have the same thoughts like you Jeff

It appears in the IDE's output window. If your that bothered, why not make
your own console form (simply a multiline textbox) that displays debugging
information?

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      28th Aug 2003
I knew it was a dum statement, but now I have my answer, thanks Nick


 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      28th Aug 2003
Hi Jeff,

|| So, does this mean that all those code snippets
|| in online documentation that include [Console.
|| WriteLine] ALL assume that the user is
|| developing a console application?

Yep.

This is your first console app? You fell down. You found out.
You'll never not know again.

You're only ignorant until you learn. And this lesson's early on
the path.

But, yes, it is confusing for those first few steps.

Best wishes,
Fergus


 
Reply With Quote
 
Tom Spink
Guest
Posts: n/a
 
      28th Aug 2003
Or, you could actually call an unmanaged API, AllocConsole to display the
console window, then it should work from a Windows Form, however, this is
dangerous because you need to call FreeConsole when you are done, or when
you close the Console window, your app will terminate.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit


"Nak" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > I have the same thoughts like you Jeff

>
> It appears in the IDE's output window. If your that bothered, why not

make
> your own console form (simply a multiline textbox) that displays debugging
> information?
>
> Nick.
>
> --
>

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> It seems you are not enabling Option Strict. Enable it in the project
> properties and the compiler might find the error for you. Jobs a good'n!
>

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Console.Writeline shapper Microsoft ASP .NET 4 22nd Sep 2007 03:30 PM
Console.WriteLine vs. Debug.WriteLine formatting Zytan Microsoft C# .NET 1 27th Feb 2007 02:24 AM
Console::WriteLine() bill Microsoft Dot NET Framework Forms 3 24th Dec 2005 12:29 AM
Console.WriteLine Rick Microsoft C# .NET 2 21st Jul 2005 05:49 AM
Console.Writeline hangs if user click into the console window Urs Eichmann Microsoft VB .NET 3 20th Jul 2004 06:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:34 AM.