Created
September 21, 2013 06:56
-
-
Save Fhernd/6647973 to your computer and use it in GitHub Desktop.
Clase que contiene métodos utilitarios para una aplicación tipo consola en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace OrtizOL.Recetas.Capitulo01 | |
{ | |
public class Utilidades | |
{ | |
// Solicita al usuario ingresar un dato desde la entrada estándar. | |
public static string LeerCadena(string mensaje) | |
{ | |
Console.Write(mensaje); | |
return Console.ReadLine(); | |
} | |
// Muestra mensaje en la salida eständar. | |
public static void EscribirCadena(string mensaje) | |
{ | |
Console.WriteLine(mensaje); | |
} | |
// Punto de entrada a la aplicaciön. | |
public static void Main() | |
{ | |
// Mensaje de solicitud de entrada | |
string nombre = LeerCadena ( "Ingrese su nombre: "); | |
// Mensaje de bienvenida | |
EscribirCadena("Bievenido al blog OrtizOL, " + nombre; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment