mhpo Posted April 8, 2003 Posted April 8, 2003 Hi, I'm wondering, when I want to write and read a view times with / to console if there is not a possibility to shortening my VB code like this: with system.console .writeline("...") myVar = .readline() .writeline(...) myVar2 = .readline() end with That doesn't function. What functions is to seperate the blocks for read and write: With System.Console.In myVar = .ReadLine() End With With System.Console.Out .WriteLine("...") End With But that's not what makes my code effective. Is there another way to do it more elegant :confused:??? Thank you for all answers. Quote
*Experts* Volte Posted April 8, 2003 *Experts* Posted April 8, 2003 Just add Imports System.Console at the very top of the class or module that your console code is in. Then you can just use ReadLine and WriteLine by themselves with no Console.Anything. Quote
mhpo Posted April 9, 2003 Author Posted April 9, 2003 VolteFace Oh yes - that's it! Thank you. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.