Skip to content

Instantly share code, notes, and snippets.

@priesdelly
Last active February 24, 2019 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priesdelly/ae54610439c23d18c2f4de770baa66f2 to your computer and use it in GitHub Desktop.
Save priesdelly/ae54610439c23d18c2f4de770baa66f2 to your computer and use it in GitHub Desktop.
Create 12 month via code in .NET Framework
private void Form1_Load(object sender, EventArgs e)
{
for (int monthNo = 1; monthNo < 12; monthNo++)
{
var bar = new DateTime(DateTime.Now.Year, monthNo, 1);
listBox1.Items.Add(bar.ToString("MMMM", new CultureInfo("en-US")));
listBox2.Items.Add(bar.ToString("MMMM", new CultureInfo("th-TH")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment