473,890 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Console.WriteLi ne does not appear to work

Rob
I am reading a VB.net book which includes many samples where the author uses
the Console.Writeli ne feature to illustrate a point. I assume that is
Console.Writeli ne is supposed to send something to the Display. Any reason
why that may not work on my system ?

Thanks !

Nov 21 '05 #1
4 10671
Rob schrieb:
I am reading a VB.net book which includes many samples where the author uses
the Console.Writeli ne feature to illustrate a point. I assume that is
Console.Writeli ne is supposed to send something to the Display. Any reason
why that may not work on my system ?

Maybe it's not a console application?

Armin
Nov 21 '05 #2
Yes, in order to do this you have to be a console app. However, you can get
the same effect using Debug.Writeline , which will write to the output window
if you are running in Visual Studio. Otherwise, make yourself a floating
window, stick a multiline text box onto it and append your output to it's
text (with a crlf at the end).

"Rob" <rw*****@comcas t.net> wrote in message
news:9f******** ************@co mcast.com...
I am reading a VB.net book which includes many samples where the author
uses the Console.Writeli ne feature to illustrate a point. I assume that
is Console.Writeli ne is supposed to send something to the Display. Any
reason why that may not work on my system ?

Thanks !

Nov 21 '05 #3
"Rob" <rw*****@comcas t.net> schrieb:
I am reading a VB.net book which includes many samples where the author
uses the Console.Writeli ne feature to illustrate a point. I assume that
is Console.Writeli ne is supposed to send something to the Display. Any
reason why that may not work on my system ?


Make sure your project is a Console Application. You can change the project
type in the project's properties dialog.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Rob

Thanks... now I see it !!

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:ed******** ******@TK2MSFTN GP09.phx.gbl...
"Rob" <rw*****@comcas t.net> schrieb:
I am reading a VB.net book which includes many samples where the author
uses the Console.Writeli ne feature to illustrate a point. I assume that
is Console.Writeli ne is supposed to send something to the Display. Any
reason why that may not work on my system ?


Make sure your project is a Console Application. You can change the
project type in the project's properties dialog.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5395
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my application (VB.NET) will start a process, redirect its stdout and capture that process' output, displaying it in a window. I've written a component for this, and a test application for the component. It allows me to specify a command to execute,...
7
6368
by: shawnk | last post by:
Hello Everyone How do you format format numbers right-justified using Console.WriteLine(), i.e I need to line up numbers in vertical columns and the MSDN documentation is pretty poor Here is the problem double percent_00_01 = 1D / 10000D double percent_00_10 = 1D / 1000D double percent_01_00 = 1D / 100D double percent_10_00 = 10D / 100D
7
4399
by: ajikoe | last post by:
Hello All, It is said that : Enabling the console window is easy. From Microsoft Visual Studio®, right-click on the project and choose Properties. Change the output type from Windows Application to Console Application. I use C# Standard Edition and I can't change the output type files from Windows Application to Console Application. I can' t find how tho change it although I follow this procedure: Menu Project -> Properties -> Common...
5
6352
by: Publicjoe | last post by:
I am working on a little app which uses colour in the console window. I have created a class to extend the console functionality but the ClearScreen method does not work correctly. I am enclosing a complete project to show what happens. If anybody has an idea of how to fix this, please let me know. Yes I am aware that this is all in .Net 2. Thanks in advance.
19
5918
by: Jeff S | last post by:
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.
4
2985
by: Bob | last post by:
I just recently noticed that when I start my applicatoin in debug mode, the IDE hangs (no disk or CPU activity) indefinitely (at least 20 minutes). Pausing the application shows that it's hung up at a line in a referenced assembly, one of my own, which is a simple Console.WriteLine() statement. The stack trace shows this line one level under the current frame, which is displayed as . Anyone seen this behavior before, know what causes it?...
3
1732
by: Andrew Ducker | last post by:
We were using Console.Writeline from within our app, to do some routine debugging. And then we started having random problems when the code was run by a tester, on their own machine. We couldn't replicate these problems on the developer machines. And then we eventually worked out that on the dev machines Console output was going to a window, and on the test machines it was going....nowhere.
2
2963
by: djc | last post by:
out of all the overloads that pop up via intellisense for console.writeline() the following one confuses me: Console.WriteLine (string format, params object arg) 1) whats the deal with 'params' there? I am used to this pattern: type var, type var, type var etc... like: string str, int i, double x. This console.writeline overload says 'params object arg' ? 2) I noticed that the console.writeline( string, object, object, object,
4
8638
by: eduardorp1 | last post by:
I have a GUI application that needs to be invoked from the command line as well. It should work both as a GUI and as a console application. When I invoke it from the command line, it reads all the command line options perfectly. However, I can't use Console.WriteLine to write messages to the console (the lines don't appear at the console window). Is it possible? What should I do to "connect" the console? My Main() is:
0
9826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11234
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10829
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7171
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6058
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.