using System.Collections.Generic;
public static void Main()
List<Contact> myContacts = new List<Contact>();
Console.WriteLine("Bienvenido:");
Console.WriteLine("¿Qué quieres hacer?");
Console.WriteLine("1 Agregar Contacto");
Console.WriteLine("2 Ver Contactos");
Console.WriteLine("3 Eliminar Contactos");
Console.WriteLine("4 Salir");
num = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Introduce el nombre");
Ename = Console.ReadLine();
Console.WriteLine("Introduce Numero telefónico");
EphoneNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Introduce la edad");
Eage = Convert.ToInt32(Console.ReadLine());
myContacts.Add(new Contact{
PhoneNumber = EphoneNumber,
Console.WriteLine("Contacto Registrado con exito");
foreach(var Contact in myContacts){
Console.WriteLine("*************");
Console.WriteLine(Contact.Name);
Console.WriteLine(Contact.PhoneNumber);
Console.WriteLine(Contact.Age);
foreach(var Contact in myContacts){
Console.WriteLine("Contacto #"+ contador);
Console.WriteLine(Contact.Name);
Console.WriteLine("¿Qué contacto quieres borrar?");
elcon = Convert.ToInt32(Console.ReadLine());
myContacts.RemoveAt(elcon);
Console.WriteLine("Contacto eliminado con exito");
Console.WriteLine("Adios");
public string Name{get; set;}
public int PhoneNumber{get; set;}
public int Age{get; set;}