Hi,
Please help me to create month names (January, February…December) programatically. I do not want to hardcode the month names.
Thank you in advance.
Hi,
Please help me to create month names (January, February…December) programatically. I do not want to hardcode the month names.
Thank you in advance.
String[] arrMonths = new String[11]
DateTime dt
Create an integer variable “index” with a default value zero and use foreach loop to set month names.
ForEach index in Enumerable.Range(0,11)
dt = new DateTime(DateTime.Now, index,1)
arrMonths(index) = dt.ToString("MMMM")
Next
Now the array contains all month names.
Regards,
Karthik Byggari
worked.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.