This is a simple C# class that can be used to run console commands and get the standard output and standard error text of the command. Most of the functionality to do this is provided by the Process class. However, it is useful to have the surrounding code wrapped up in a class that can be easily reused in different projects.
View the entire article at http://www.codeproject.com/Tips/468480/Csharp-Command-Prompt-class