System.Enum Class
Information   Base Types   Related Resources

Provides the base class for enumerations.

  • Namespace: System
  • First seen in: .NET v1.0.3705
  • Last seen in: .NET v1.1.4322
  • Last changed in: .NET v1.0.3705
  • Assembly: mscorlib.dll

  • View this type on MSDN
  • View this type on WinFX 247
    Articles (3)Discussions (192)MembersRotorChanges
    Articles

    Page: 1
    Enumerates
    DotNetJunkies
    In this article, Pierre demonstrates how the class System.Enum can be useful. He also runs through an example of the new functionality applied to enums through the .NET Framework.
    Extolling the Virtues of Enumerated Types
    MSDN
    Most programmers are already familiar with enumerated types. But just to review, an enumerated type defines a set of symbolic names and values. Of course, a programmer can always write a program using 0 to represent red, 1 to represent green, and so on. However, there are at least two reasons why you shouldn't hardcode numbers into their code and should instead use an enumerated type.
    Using Enumerations in C#
    The Code Project
    In C# we can use the enum keyword to create our own enumerated types. C# maps enum to System.Enum and thus we can use several member functions provided by System.Enum on our enum types. Instead of explaining more I take you straight to the sample program I have written to demonstrate how enum can be used. The program is well-commented, but if you have any doubts I'd be glad to help you out if it is within my capability.
    Ad
    MBR BootFX
    Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
     
     Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
    Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com