Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

all month in array

var months = new string[12]; 
for (var month = 1; month <= 12; month++)
{
	var firstDay = new DateTime(DateTime.Now.Year, month, 1);
  	var name = firstDay.ToString("MMMM", CultureInfo.CreateSpecificCulture("en"));
  	months[month - 1] = name;
}

foreach (var month in months) 
{
	Console.WriteLine($"-> {month}");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #month #array
ADD COMMENT
Topic
Name
8+7 =