DylanJones1
asked on
C# Month number to Month Name
Is there a simple C# function that when given an int 1 - 12 will return the string name for the month - January
MessageBox.Show(MonthName( 12))
Hope this helps
Sorry thats VB
ASKER
Looks like excatly what I want what do I need to reference (using) to get it to work?
Yep just add
Using Microsoft.VisualBasic ;
Using Microsoft.VisualBasic ;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Seems that you may have to create your own.
Pitty though.
Pitty though.
I got it ti work
Have to add a reference to the Microsoft.VisualBasic assembly and then call then the following code will work
using Microsoft.VisualBasic;
MessageBox.Show(DateAndTim e.MonthNam e(12,false ));
Have to add a reference to the Microsoft.VisualBasic assembly and then call then the following code will work
using Microsoft.VisualBasic;
MessageBox.Show(DateAndTim
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Very nice touch, Bob.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I normally use justdriveon's approach. Doesn't require the "using Microsoft.VisualBasic;"
It would make sense if someone didn't know it was there. Look at how deep you have to look into the .NET framework to find it.
Bob
Bob
ASKER
Thanks All!!!