For the months, you can do something like this:
Dim monthsFull(11) As String
Dim monthsAbbr(11) As String
For monthNumber As Integer = 1 To 12
' Get full month name
monthsFull(monthNumber - 1) = DateAndTime.MonthName(monthNumber)
' Get abbreviated month name
monthsAbbr(monthNumber - 1) = DateAndTime.MonthName(monthNumber, True)
Next
Please note that this is locale aware, i.e. it will return the localised
names, depedning on the regional settings on the system, on which you're
running the code. As to the days of the month, I'm not quite sure what you
mean. Check out the DataAndTime module, and in particular the Weekday and
WeekdayName functions.

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk
> is there a way in .net to pull a list of months, and then pull a list of
> days in the month. instead of retyping a control that lists the number of
> days for each month i was hoping it was already in .net. thank you
John Bowman - 23 Sep 2005 13:49 GMT
Carsten,
Since C# does not have a DateAndTime object (but does have a DateTime) which
has a MonthName method, how could you do the same thing in C#?
John
> For the months, you can do something like this:
>
[quoted text clipped - 17 lines]
>> days in the month. instead of retyping a control that lists the number of
>> days for each month i was hoping it was already in .net. thank you
CT - 23 Sep 2005 14:38 GMT
Something along these lines:
string[] monthsFull = new string[12];
string[] monthsAbbr = new string[12];
for (int monthNumber = 1; monthNumber <= 12; monthNumber++)
{
// Get full month name
monthsFull[monthNumber - 1] = new DateTime(1999, monthNumber,
1).ToString("MMMM");
// Get abbreviated month name
monthsAbbr[monthNumber - 1] = new DateTime(1999, monthNumber,
1).ToString("MMM");
}

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk
> Carsten,
>
[quoted text clipped - 24 lines]
>>> days in the month. instead of retyping a control that lists the number
>>> of days for each month i was hoping it was already in .net. thank you
John Bowman - 23 Sep 2005 17:07 GMT
Carsten,
Thanks for the idea. I just found another way to retrieve the localized
Month names and the same approach works works for Days of the week too...
internal static string GetLocalizedMonthOfYear(int Month)
{
return
Thread.CurrentThread.CurrentCulture.DateTimeFormat.GetMonthName(Month);
}
internal static string GetLocalizedDayOfWeek(int Day)
{
return
Thread.CurrentThread.CurrentCulture.DateTimeFormat.GetDayName((DayOfWeek)Day);
}
With either your's or my approach, just change your Regional settings in
control panel, and viola, you get back the localized month for the language
you choose.
Thanks again,
John
> Something along these lines:
>
[quoted text clipped - 40 lines]
>>>> number of days for each month i was hoping it was already in .net.
>>>> thank you
CT - 23 Sep 2005 17:59 GMT
Yes, there seems to be multiple ways of doing most things in .NET. Great,
isn't it? :-)

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk
> Carsten,
>
[quoted text clipped - 66 lines]
>>>>> number of days for each month i was hoping it was already in .net.
>>>>> thank you