Trying to understand enums
- From: AMP <ampeloso@xxxxxxxxx>
- Date: Tue, 23 Jun 2009 16:12:01 -0700 (PDT)
Hello,
When I use a Constant:
const int MyAge = 200;
Console.WriteLine(MyAge)
Produces:
200
But when I use :
enum Me
{
MyAge=200
}
Console.WriteLine(Me.MyAge);
I get
MyAge.
I want to use an enum as constant in the same fashion, but I must be
misunderstaning Enums???
Any Help?
Thanks
Mike
.
- Follow-Ups:
- Re: Trying to understand enums
- From: Peter Duniho
- Re: Trying to understand enums
- Prev by Date: Re: Unique GUID for an asynchronous task
- Next by Date: Re: How does managed code work?
- Previous by thread: DataAdapter
- Next by thread: Re: Trying to understand enums
- Index(es):