classDowhileapp {//This is a server model that supports single-user Public Static voidMain () {//Welcome information for printing SoftwareConsole.WriteLine ("Welcome to use Whileapp V0.1"); //command to store the user's commands stringcommand; Do { //Print command input characterConsole.Write (">"); //commands to read into the userCommand =Console.ReadLine (); Switch(command) {//handling the Get command Case "Get": Doget (); Break; //working with put commands Case "put": DoPut (); Break; //command exits the program for exit Case "Exit": Break; //Handling Default Commands default: Dodefault (); Break; } } while(Command! ="Exit");//command exits the program for exit } //handling the Get command Private Static intdoget () {//to add a real get processing actionConsole.WriteLine ("get file ... ok"); return 0; } //working with put commands Private Static intDoPut () {//to add a real put processing actionConsole.WriteLine ("transfer files ... ok"); return 0; } //Handling Default Commands Private Static intDodefault () {//Print error messageConsole.WriteLine ("Command Error"); //prompt for correct usageConsole.WriteLine ("the set of commands supported by Whileapp V0.1 are:"); Console.WriteLine ("\tget:\t getting files"); Console.WriteLine ("\tget:\t Transferring Files"); Console.WriteLine ("\texit:\t Exit Program"); return 0; }}
_10_do_while Cycle __