Console Application - avoid window closes

  • Thread starter Thread starter Klaus Löffelmann
  • Start date Start date
K

Klaus Löffelmann

Hi,

it may be a stupid question and maybe I'm not seeing the wood for the trees,
but how do I let the console window remaining open after the app terminates?

(Console.Readline as last code line won't work in my case, since I'm testing
a class' finalize-method).

Thanks

Klaus
 
The easiest way is to have the window open before you run it. Then run it from the command line,
it should stay open when the app terminates. There is probably another way to do it though.
 
Hi,

Start the app with ctrl-F5 or add Console.Readline() at the end.

Module Module1

Sub Main()

Dim x As Integer

For x = 0 To 9

Console.WriteLine(x.ToString)

Next

Console.Write("Press enter to continue")

Console.ReadLine()

End Sub

End Module

Ken
 
Klaus,

* "Klaus Löffelmann said:
it may be a stupid question and maybe I'm not seeing the wood for the trees,
but how do I let the console window remaining open after the app terminates?

(Console.Readline as last code line won't work in my case, since I'm testing
a class' finalize-method).

I replied in the German language VB.NET group.
 
Sorry, for the "kind of" cross posting, Herfried,
but I wrote to the German newsgroup not noticing it was already something
like 2am. So I thought taking advantage of the time difference and therefore
posting it here again could help me right away...

:-)

Klaus
 
* "Klaus Löffelmann said:
Sorry, for the "kind of" cross posting, Herfried,
but I wrote to the German newsgroup not noticing it was already something
like 2am. So I thought taking advantage of the time difference and therefore
posting it here again could help me right away...

You don't need to apologize.
 
Back
Top