static void Borrar() { string rut; Console.WriteLine("Borrar Restaurante con este Rut: "); rut = Console.ReadLine(); if (rut != "") { Restaurante rest = Restaurante.LeerPorRut(rut); //esto me gustaria hacerlo dentro del metodo de clase pero no se. rest.Borrar(); Console.WriteLine(rest.RazonSocial + " ha sido borrado"); } }
static void BuscarPorRut() { string rut; string msg = "No se encontraron restaurantes con ese id"; //no estoy mostrando error aun Console.WriteLine("Buscar por rut del Restaurante"); Console.WriteLine("ingresar rut:"); rut = Console.ReadLine(); if (rut != "") { Restaurante rest = Restaurante.LeerPorRut(rut); Console.WriteLine(rest.RazonSocial); } }