static void Main(string[] args) { //INICIALIZO ATRIBUTO Sello.mensaje = " Hola new york "; Sello.color = ConsoleColor.Red; //LLAMADA METODO IMPRIMIR //Console.WriteLine(Sello.Imprimir()); //LLAMADA METODO BORRAR // Sello.Borrar(); //LLAMADA METODO IMPRIMIR Console.WriteLine(Sello.Imprimir()); //LLAMADA METODO IMPRIMIR EN COLOR Sello.ImprimirEnColor(); Console.WriteLine(Sello.Imprimir()); Console.ReadKey(); //fin consola }
//Metodo cambia color y vuelve a colocar el color original public static void ImprimirEnColor() { Console.ForegroundColor = Sello.color; Console.WriteLine(Sello.Imprimir()); Console.ForegroundColor = ConsoleColor.DarkGray; }
//Metodos public static string Imprimir() { return(Sello.ArmarFormatoMensaje()); }