Monthname Method
We have monthname method in VB.net, Is there any equivalent method in C#.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sheir aliPosted Jul 5, 2006, 11:08 AM
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