[Csharp] // phone book class Person. cs using System; using System. collections. generic; using System. linq; using System. text; namespace simple phone book {class Person {string name; // Name string phone; // call public string name {set {name = value ;}get {return name ;}} public string Phone {set {phone = value;} get {return phone ;}}}// Main Program. cs using System; using System. collections; using System. collections. gen Eric; using System. linq; using System. text; using System. threading. tasks; namespace simple phone book {class Program {// <summary> /// simple phone book // </summary> /// <param name = "args"> </param> static void Main (string [] args) {Console. title = "simple phone book"; // Console Title ArrayList telArray = new ArrayList (); // used to store the phone while (true) {Console. clear (); // Clear the Console. writeLine ("******************"); Console. writeLine ("* Welcome to use this System * "); Console. writeLine ("**************************"); Console. writeLine ("*. add, v. view, q, exit * "); // simple prompt interface string select = Console. readLine (). toString (); if (select = "a") // Add the phone {Console. write ("Enter name:"); string name = Console. readLine (); Console. write ("Enter the phone number:"); string phone = Console. readLine (); telArray. add (new Person () {Name = name, Phone = phone});} else if (select = "v") // view call {Console. Clear (); Console. writeLine ("telephone number book"); Console. writeLine ("name phone"); foreach (object person in telArray) {Console. writeLine ("{0} {1}", (Person) person ). name, (Person) person ). phone);} Console. read ();} else if (select = "q") // exit the program {www.2cto.com Console. clear (); Console. writeLine ("Welcome, thank you !! "); Console. ReadKey (); return ;}}}}}