Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Search Your Question

Tuesday, May 6, 2008

Can you create enumerated data types in C#?

Yes. Enumerated types can be used to create some set of identifiers that can have values of simple type. Let us see an example of enum type:

public enum weekdays
{
Monday,
Tuesday,
Wensday,
Thursday,
Friday,
}
In example there are enum that has days of week. The values of days by default are in range from 0 to 4.

No comments:

Archives