I am trying to achieve Model-view separation. My airplane is a class. While developing the application, can't I use the console as sort of viewer. Can I spawn the airplane on开发者_开发问答 it's own thread, while the console makes references to the airplane object to retrieve/read it's current altitude. I am trying to make the airplane an Active object, as in Java's runnable interface. How do you achieve this in .NET?
Assuming that by model view separation you mean something like this, then it is definately possible.
The challenge I would see in using the console as the viewer technology would be replicating the standard application message loop that occurs in a typical windows project.
But other than that, definately possible. Is there any specific reason why you want to use the console as the viewer? I would just go the WPF route personally, so I am interested to see what your motivation for the console approach would be?
精彩评论