Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Globalization;
- namespace Articulos.CSharp.Cap06
- {
- public class UsoNow
- {
- public static void Main()
- {
- Console.WriteLine ();
- // Obtiene la fecha actual:
- DateTime fechaLocal = DateTime.Now;
- // Regiones horarias por país-IDIOMA:
- string[] regionesHorarias = { "en-US", "en-GB", "es-ES", "ru-RU", "de-DE", "fr-FR"};
- // Muestra las diferentes representaciones para cada región horaria:
- foreach (string regionHoraria in regionesHorarias)
- {
- CultureInfo infoRegionHoraria = new CultureInfo(regionHoraria);
- Console.WriteLine ("{0}: {1}", regionHoraria, fechaLocal.ToString(infoRegionHoraria));
- }
- Console.WriteLine ();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement