I have a line that is about 1.5kb of text. I want my console app to read it but only the first 255 characters can be pasted in. How do I increase this limit? I am literally reading it using Console.ReadLine() in debug mode under visual studio 2013
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
This have been already discussed a couple times. Let me introduce you to the best solution i saw so far ( Console.ReadLine() max length? )
The concept: verriding the readline function with OpenStandartInput (like the guys in the comments mentioned):
The implementation:
This way you get the most you can from the console, and it'll work for more than 1.5 KB.
From MSDN something like this ought to work:
The you can convert your byte array to a string with something like: