/* This Example is a part of different * examples shown in Book: * C#2005 Beginners: A Step Ahead* Written by: Gaurav Arora * Reach at : msdotnetheaven*/// File name : mathclassClient.csusing System;using System.Collections.Generic;using System.Text;using CSharp.AStepAhead.privateAssembly;namespace CSharp.AStepAhead.privateAssemblyClient{ class mathClassClient { static void Main(string[] args) { try { int x, y, o = 0; mathClass myObj; for (; ; ) { Console.Clear(); Console.Write(" *** Math Operations *** \n"); Console.Write("\n 1 Addition"); Console.Write("\n 2 Substraction"); Console.Write("\n 3 Multiplication"); Console.Write("\n 4 Division"); Console.Write("\n 5 Square"); Console.WriteLine("\n 6 Exit"); Console.Write("\n Please Select Options [1-6] : "); o = int.Parse(Console.ReadLine()); if (o <= 0 || o > 6) { Console.WriteLine("\n Invalid Selection!\n Try again!"); Console.ReadLine(); continue; } else if (o == 6) { Console.WriteLine("\n You are exiting!"); Console.ReadLine(); Console.Clear(); break; } else { Console.Write("\n Enter First Number: "); x = int.Parse(Console.ReadLine()); Console.Write("\n Enter Second Number: "); y = int.Parse(Console.ReadLine()); myObj = new mathClass(x, y, o); Console.WriteLine("\n Assembly Details : " + myObj.GetAssemblyFullName()); Console.WriteLine("\n Result : " + myObj.ToString()); Console.ReadLine(); } } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } } }}