Monthname Method
We have monthname method in VB.net, Is there any equivalent method in C#.net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
sheir ali10 pointsPosted Jul 5, 2006, 7:08 AM EDT
Cn get from .NET framework BUT gives an extra empty element.
Take a look at:
System.Globalization.DateTimeFormatInfo.CurrentInfo()
and its MonthNames() method which returns a string array of names BUT includes an empty element.
What you could do is loop that array of month names and add all non-empty elements to an Arraylist or Hashtable...
Using the System.Globalization.DateTimeFormatInfo.CurrentInfo()
can also give you the short and long day names of the week with the following methods...
AbbreviatedDayNames() and DayNames().
Good luck
sheir