Questions tagged [console.writeline]

Writes the specified data, followed by the current line terminator, to the standard output stream.

Writes the specified data, followed by the current line terminator, to the standard output stream.

253 questions
8
votes
3 answers

Console writeline does not work

I'm debugging a UWP in C#. On a certain moment the console stops giving me the write line content. Does anyone can imagen what the problem could be?
Belekz
  • 480
  • 1
  • 7
  • 18
8
votes
3 answers

C# Can the Console overflow with too many Writelines?

If I have a program that performs Console.Writeline multiple times per second, and the program is left running for a long period of time, can the console overflow with too many lines? I just want to know if it will eventually throw an IO exception…
LT Dan
  • 241
  • 4
  • 16
7
votes
3 answers

Calling Console.WriteLine before allocating the console

I've recently encountered the following problem with my application: it didn't show any console output, though the console had been allocated by using AllocConsole. I managed to figure out soon that it was caused by an attempt (hidden deeply in…
Dmitrii Erokhin
  • 1,347
  • 13
  • 31
7
votes
2 answers

Console.Writeline working on x86 but not x64

I'm testing a project in visual studio 2012. When I run my code in x86, Console.Writeline shows up in the output window. However, when I run it in x64, it does not. I understand I can use System.Diagnostics.Debug instead, but I would really like…
Vlad
  • 1,889
  • 17
  • 33
7
votes
6 answers

Where does Console.WriteLine go in ASP.net production environment?

Is there any chance that I can see the output of Console.WriteLine command after deploying my asp.net web application in IIS? (no more Visual Studio) I checked this question: Where does Console.WriteLine go in ASP.NET? But the problem is that they…
Farshid
  • 5,134
  • 9
  • 59
  • 87
7
votes
4 answers

is Console.WriteLine a bottleneck in Windows Applications?

If I have WPF application and for debugging purposes there are messages that are being displayed on the console. Will this affect the performance of the application when its configured as a Windows Application and no console is being displayed?
Nickolay Kondratyev
  • 4,959
  • 4
  • 25
  • 43
6
votes
2 answers

Interpreting dates: Console.Writeline vs. string.Format

Given the following C# code: var dt = DateTime.Now; Console.WriteLine("{0:MM/dd/yy} ... {1}", dt, string.Format("{0:MM/dd/yy}", dt)); ... when the short date (under Windows 7, Control Panel -> Region and Language -> Additonal Settings -> Date) is…
MiloDC
  • 2,373
  • 1
  • 16
  • 25
6
votes
3 answers

How to prevent the console to write a character in the last line?

I have a problem with a console project of C#. I want to use the whole console screen to write text in it. Meaning, for example, to "draw" a border along the border of the console. The problem is the unnecessary last character in the last line. How…
Marco Frost
  • 780
  • 3
  • 12
  • 25
6
votes
3 answers

How to in C# keep a set number of letters for a string in console writeline

Ok so basically I want something like Console.WriteLine( "{0}: {1}/{2}hp {3}/{4}mp {5}", character.Identifier, character.CurrentHealth, character.MaxHealth, character.CurrentMagic, character.MaxMagic, …
Dan
  • 89
  • 2
  • 7
5
votes
1 answer

How to force Console.WriteLine() to print verbatim strings?

Possible Duplicate: Can I convert a C# string value to an escaped string literal How can I print a string (via Console.WriteLine()) such that any/all escape sequences that may exist in the string is printed verbatim? Example: string s = "This…
Jed
  • 10,649
  • 19
  • 81
  • 125
5
votes
2 answers

named parameters Console.WriteLine c#

I frequently write a Console.WriteLine statement and then modify it at a later stage. I then end up with statements such as this. Console.WriteLine("{2} is not greater than {0} or smaller than {1}",min,max, grade); Is there a way to explicitly name…
asterixorobelix
  • 118
  • 1
  • 7
5
votes
2 answers

In C#, what does using a dollar sign do in Console.WriteLine

thank you for looking at my question, to verify what i mean Console.WriteLine($"Hello {variable}"); I am curious to the effect that the $ has on the output from Console.WriteLine
TJ Corey
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Get an event hook to Console.WriteLine

In a c# console application, is there a way to get a notification whenever text is written to the console via Console.WriteLine and Console.Write? Whenever this event fires, it should be possible to do things like change the text before it is…
HugoRune
  • 13,157
  • 7
  • 69
  • 144
5
votes
2 answers

Does Console.Write ever fail?

I am testing my run() function to make sure it has all the correct things populated by the end of the method. I populate 4 fields from our databases, two strings, and two IEnumerable(string)'s. The idea is to print them all out for all the people I…
Alex Chumbley
  • 754
  • 3
  • 10
  • 14
5
votes
1 answer

Console.WriteLine and Memory Leaks

I'm trying to reduce the memory usage of a console application I have. It is supposed to run for hours on end, but it seems like the memory usage is gradually increasing with each second. It does use multiple threads, and does a variety of things,…
AlishahNovin
  • 1,904
  • 3
  • 20
  • 37
1
2
3
16 17