Link to home
Start Free TrialLog in
Avatar of G0ggy
G0ggyFlag for United Kingdom of Great Britain and Northern Ireland

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:

string[] months = DateTimeFormatInfo.MonthNames;

Open in new window


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
Avatar of G0ggy
G0ggy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial