开发者

Access and modify Console.Readline() programmatically

In C# Console.ReadLine() implement开发者_运维问答s history buffer of the previous strings read through the console. This buffer can be accessed by arrows up and down and also F7 button. Is there any way to access and modify this buffer programmatically within the code?


I'm pretty sure that's not part of Console.Readline() - that's native to the operating system. The command window does that whether or not you run a console app.

It MAY be possible to access that input buffer, but I don't think you're going to do it via standard CLR objects. Instead I think you'll need to use unsafe access to the Win32 API (presuming you're on Win32).

This link talks about the Console and it's available functions and properties via the API but that's about all the help I can offer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜