I am writing a .NET console application to upload files. However, I might have to create a GUI front end for this application in the future. How can I best design my console application with this in mind? Passing arguments will be simple, but how can I show progress and errors in the GUI?
Share
Keep your application presentation and logic decoupled. You can design your application around interfaces. For example, if you create and use an
IProgressinterface for reporting progress, your console application can use Console.Write to report progress, but your GUI application, later, can just use the same interface to update a progress bar.