G0ggy
asked on
Error using SystemGlobalization DateTimeFormatInfo
Hi all,
I'm using this example to get an array of month names:
http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.monthnames.aspx
This is my code:
However this is producing this error:
"An object reference is required for non-static field, method or property"
I'm sure this is fairly simple to solve but it's eluding me at the moment.
Thanks.
I'm using this example to get an array of month names:
http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.monthnames.aspx
This is my code:
string[] months = DateTimeFormatInfo.MonthNames;
However this is producing this error:
"An object reference is required for non-static field, method or property"
I'm sure this is fairly simple to solve but it's eluding me at the moment.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.