Geekpedia Programming Tutorials






How do I set the type of an enumeration?

On Friday, July 16th 2004 at 12:00 AM
By Andrew Pociu (View Profile)
-----   (Rated 0 with 0 votes)
Advertisement
More C# Resources
Usually you don't specify a type for an enumeration and the default will be considered, which is int.
In the following example we change the type to unsigned int (uint):

enum Pounds :uint
{
   Light = 10,
   Medium = 30,
   Heavy = 60
}
Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
There are no comments.

Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs C# Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Download

Latest Icons