M
M
morello2014-05-29 10:57:57
C++ / C#
morello, 2014-05-29 10:57:57

Interactive console application in C#

Tell me how to implement an interactive console application in c#, with the ability to process commands entered from the user (Console.ReadLine ()), taking into account multi-threaded output of messages using Console.WriteLine ().
Those. it is necessary to place the user command input block in the lower part of the console and "protect" this zone from displaying messages.
I would like to implement something similar to:

Desired result
5f91bb391bee44a195b978133c8c03e1.jpg

And it just works like this:
Result
b2a027c3d03a4badbe00707da9b6ebf5.jpg

Examples include the Asterisk console, MySQL, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxaon, 2014-05-29
@maxaon

You either need to do synchronization between threads, or, preferably, work with the console in only one thread (ui thread). Other threads will pull the thread's ui methods.
Look, maybe something has been done before you (Powershell for example).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question