A
A
Alek_dr2015-04-11 00:21:59
Programming
Alek_dr, 2015-04-11 00:21:59

The console does not contain all the data, how to fix it?

I encountered an unexpected problem while learning C#. The entire code of the program is Console.ReadLine(), but it is impossible to enter more than 254 (if not miscalculated) characters. No error, no sound, nothing. It just doesn't enter. Buffer size - 999. If you just run the command line, everything is entered normally.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spetros, 2015-04-11
@Alek_dr

MSDN!
https://msdn.microsoft.com/en-us/library/system.co...
By default, the method reads data from an input buffer of 256 characters. Because it contains Environment.NewLine characters, the method can read lines containing up to 254 characters. To read extended lines, call the OpenStandardInput(Int32) method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question