(Console.BufferHeight) I can't see/scroll to see all the console output with Console.WriteLine
When I run this code, the number at the top of the output window is 99701. Why don't I get to see all the way through 1? I actually see all the numbers getting outputted, but on the console window, I can only SCROLL high enough to see 99701 (I'm guessing). I'm using Visual C# express on Vista Home. :D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using utilities;
namespace Testing_Project
class Program
static void Main(string args)
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add( x.ToString() );
foreach (string s in myList)
Console.WriteLine(s);
Console.Read();
Console.Write(s) does fine, but Console.Write( s+"n") does not. I'm guessing I can only scroll up through so many newlines?
c# .net console.writeline
add a comment |
When I run this code, the number at the top of the output window is 99701. Why don't I get to see all the way through 1? I actually see all the numbers getting outputted, but on the console window, I can only SCROLL high enough to see 99701 (I'm guessing). I'm using Visual C# express on Vista Home. :D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using utilities;
namespace Testing_Project
class Program
static void Main(string args)
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add( x.ToString() );
foreach (string s in myList)
Console.WriteLine(s);
Console.Read();
Console.Write(s) does fine, but Console.Write( s+"n") does not. I'm guessing I can only scroll up through so many newlines?
c# .net console.writeline
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58
add a comment |
When I run this code, the number at the top of the output window is 99701. Why don't I get to see all the way through 1? I actually see all the numbers getting outputted, but on the console window, I can only SCROLL high enough to see 99701 (I'm guessing). I'm using Visual C# express on Vista Home. :D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using utilities;
namespace Testing_Project
class Program
static void Main(string args)
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add( x.ToString() );
foreach (string s in myList)
Console.WriteLine(s);
Console.Read();
Console.Write(s) does fine, but Console.Write( s+"n") does not. I'm guessing I can only scroll up through so many newlines?
c# .net console.writeline
When I run this code, the number at the top of the output window is 99701. Why don't I get to see all the way through 1? I actually see all the numbers getting outputted, but on the console window, I can only SCROLL high enough to see 99701 (I'm guessing). I'm using Visual C# express on Vista Home. :D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using utilities;
namespace Testing_Project
class Program
static void Main(string args)
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add( x.ToString() );
foreach (string s in myList)
Console.WriteLine(s);
Console.Read();
Console.Write(s) does fine, but Console.Write( s+"n") does not. I'm guessing I can only scroll up through so many newlines?
c# .net console.writeline
c# .net console.writeline
edited Jun 9 '12 at 13:40
Alfred Myers
5,54912761
5,54912761
asked Sep 2 '09 at 21:14
Gordon GustafsonGordon Gustafson
25.6k2297146
25.6k2297146
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58
add a comment |
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58
add a comment |
5 Answers
5
active
oldest
votes
From .Net Framework 2.0 and beyond, you can change the buffer height from within your own program with Console.BufferHeight:
Console.BufferHeight = Int16.MaxValue - 1; // ***** Alters the BufferHeight *****
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add(x.ToString());
foreach (string s in myList)
Console.WriteLine(s);
The maximum height is Int16.MaxValue - 1.
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
add a comment |
300 seems to be your default console buffer size. This is a Windows setting and it is not related to your application.
You can change the console buffer size by creating a shortcut to the executable. Then right click on the shortcut and select Properties. Go in the Options tab and change the buffer size.
Seem that I didn't check that feature in a long time, but it seem to be modifiable now. See Alfred Myers answer
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
add a comment |
It is the console not your app.
As an alternative you can use Debug.WriteLine (System.Diagnostics) and use the Output window in Visual Studio. It has a much bigger buffer (just be sure to run a Debug build).
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
add a comment |
This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
add a comment |
You don't get to see anymore than that because the console does not buffer more than 300 rows by default. Use the settings dialog for the console to change this - I believe you can just start a command prompt and change them there, then run your program.
Alfred has already pointed out how your application can change the buffer height.
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1370158%2fconsole-bufferheight-i-cant-see-scroll-to-see-all-the-console-output-with-con%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
From .Net Framework 2.0 and beyond, you can change the buffer height from within your own program with Console.BufferHeight:
Console.BufferHeight = Int16.MaxValue - 1; // ***** Alters the BufferHeight *****
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add(x.ToString());
foreach (string s in myList)
Console.WriteLine(s);
The maximum height is Int16.MaxValue - 1.
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
add a comment |
From .Net Framework 2.0 and beyond, you can change the buffer height from within your own program with Console.BufferHeight:
Console.BufferHeight = Int16.MaxValue - 1; // ***** Alters the BufferHeight *****
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add(x.ToString());
foreach (string s in myList)
Console.WriteLine(s);
The maximum height is Int16.MaxValue - 1.
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
add a comment |
From .Net Framework 2.0 and beyond, you can change the buffer height from within your own program with Console.BufferHeight:
Console.BufferHeight = Int16.MaxValue - 1; // ***** Alters the BufferHeight *****
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add(x.ToString());
foreach (string s in myList)
Console.WriteLine(s);
The maximum height is Int16.MaxValue - 1.
From .Net Framework 2.0 and beyond, you can change the buffer height from within your own program with Console.BufferHeight:
Console.BufferHeight = Int16.MaxValue - 1; // ***** Alters the BufferHeight *****
List<string> myList = new List<string>();
for (int x = 0; x < 100000; x++)
myList.Add(x.ToString());
foreach (string s in myList)
Console.WriteLine(s);
The maximum height is Int16.MaxValue - 1.
answered Sep 2 '09 at 21:56
Alfred MyersAlfred Myers
5,54912761
5,54912761
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
add a comment |
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
Hmm, indeed you can? Good to know. Still not enough for 100000 items though. :)
– Botz3000
Sep 2 '09 at 21:58
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
That gets me to 67235, but more importantly it explains the problem :D
– Gordon Gustafson
Sep 3 '09 at 23:34
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
Rock'n'Roll ! :D
– Mehdi LAMRANI
Jul 11 '12 at 19:54
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
a bit confusing that BufferHeight and BufferWidth are Int32 but only accept Int16 values. :/
– cmxl
Apr 14 '15 at 13:16
add a comment |
300 seems to be your default console buffer size. This is a Windows setting and it is not related to your application.
You can change the console buffer size by creating a shortcut to the executable. Then right click on the shortcut and select Properties. Go in the Options tab and change the buffer size.
Seem that I didn't check that feature in a long time, but it seem to be modifiable now. See Alfred Myers answer
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
add a comment |
300 seems to be your default console buffer size. This is a Windows setting and it is not related to your application.
You can change the console buffer size by creating a shortcut to the executable. Then right click on the shortcut and select Properties. Go in the Options tab and change the buffer size.
Seem that I didn't check that feature in a long time, but it seem to be modifiable now. See Alfred Myers answer
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
add a comment |
300 seems to be your default console buffer size. This is a Windows setting and it is not related to your application.
You can change the console buffer size by creating a shortcut to the executable. Then right click on the shortcut and select Properties. Go in the Options tab and change the buffer size.
Seem that I didn't check that feature in a long time, but it seem to be modifiable now. See Alfred Myers answer
300 seems to be your default console buffer size. This is a Windows setting and it is not related to your application.
You can change the console buffer size by creating a shortcut to the executable. Then right click on the shortcut and select Properties. Go in the Options tab and change the buffer size.
Seem that I didn't check that feature in a long time, but it seem to be modifiable now. See Alfred Myers answer
edited May 23 '17 at 10:27
Community♦
11
11
answered Sep 2 '09 at 21:16
Pierre-Alain VigeantPierre-Alain Vigeant
17k65397
17k65397
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
add a comment |
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
3
3
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
add a comment |
It is the console not your app.
As an alternative you can use Debug.WriteLine (System.Diagnostics) and use the Output window in Visual Studio. It has a much bigger buffer (just be sure to run a Debug build).
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
add a comment |
It is the console not your app.
As an alternative you can use Debug.WriteLine (System.Diagnostics) and use the Output window in Visual Studio. It has a much bigger buffer (just be sure to run a Debug build).
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
add a comment |
It is the console not your app.
As an alternative you can use Debug.WriteLine (System.Diagnostics) and use the Output window in Visual Studio. It has a much bigger buffer (just be sure to run a Debug build).
It is the console not your app.
As an alternative you can use Debug.WriteLine (System.Diagnostics) and use the Output window in Visual Studio. It has a much bigger buffer (just be sure to run a Debug build).
answered Sep 2 '09 at 21:36
Austin SalonenAustin Salonen
39.8k1393130
39.8k1393130
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
add a comment |
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
You can change the console's settings. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:13
add a comment |
This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
add a comment |
This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
add a comment |
This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.
This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.
answered Sep 2 '09 at 21:18
Carson MyersCarson Myers
20k30107158
20k30107158
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
add a comment |
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:12
add a comment |
You don't get to see anymore than that because the console does not buffer more than 300 rows by default. Use the settings dialog for the console to change this - I believe you can just start a command prompt and change them there, then run your program.
Alfred has already pointed out how your application can change the buffer height.
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
add a comment |
You don't get to see anymore than that because the console does not buffer more than 300 rows by default. Use the settings dialog for the console to change this - I believe you can just start a command prompt and change them there, then run your program.
Alfred has already pointed out how your application can change the buffer height.
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
add a comment |
You don't get to see anymore than that because the console does not buffer more than 300 rows by default. Use the settings dialog for the console to change this - I believe you can just start a command prompt and change them there, then run your program.
Alfred has already pointed out how your application can change the buffer height.
You don't get to see anymore than that because the console does not buffer more than 300 rows by default. Use the settings dialog for the console to change this - I believe you can just start a command prompt and change them there, then run your program.
Alfred has already pointed out how your application can change the buffer height.
edited Sep 3 '09 at 15:19
answered Sep 2 '09 at 21:17
Michael MadsenMichael Madsen
46.7k66075
46.7k66075
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
add a comment |
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
1
1
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
Yes it is. It can be changed through Console.BufferHeight up to Int16.MaxValue - 1
– Alfred Myers
Sep 2 '09 at 22:11
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
I stand corrected. I'll edit accordingly.
– Michael Madsen
Sep 3 '09 at 15:19
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1370158%2fconsole-bufferheight-i-cant-see-scroll-to-see-all-the-console-output-with-con%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
+1 for your question, because a lot of people got it wrong ;)
– Alfred Myers
Sep 2 '09 at 21:58