Visualizzare i nomi dei mesi in base ad una culture specifica con Asp.Net C#

Posted by: ollie10 7/31/2009 10:23 AM

Con questo script di esempio vediamo come stampare il nome dei mesi utilizzando una culture specifica.

using System.Globalization;
CultureInfo ci = new CultureInfo("it-it");
for (int i = 1; i <= 12; i++)
{
	Console.WriteLine(string.Format("Mese: {0} = {1}", new DateTime(2008,i, 1).ToString("MMMM", ci), i.ToString()));
}
Tags: , ,
Categories: Asp.NET - C# | BlogEngine.NET
Permalink | Comments (0)
RSS comment feed

Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading