passing enum value as an argument



I'm writing a class with a method that will accept 1 of 3 items listed in an
enum. Is it possible to pass the item name without the enum name in your
calling statement?

EXAMPLE:

public enum EnumName
FirstValue = 1
SecondValue = 2
ThirdValue = 3
end enum

CURRENTLY DOING THIS:
ObjectName.MethodName(EnumName.FirstValue)

WANT TO DO THIS:
ObjectName.MethodName(FirstValue)



.



Relevant Pages

  • [PATCH 5/8] drivers-edac-i3000 code tidying
    ... Style cleanup, mostly just 80-column fixes. ... enum i3000p_chips { ... we really clear bits by writing 1 to them.) ...
    (Linux-Kernel)
  • Enum from VB.NET class library not available
    ... I'm writing an application with VS.NET 2003 in C# that will use an existing ... but the enum is not. ... Public Function CheckStringLength(_ ... ByVal intMaxLength As Integer) _ ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MC++ wrapper code problems with return enum type.
    ... How about just defining a __value enum instead of the class? ... > code for writing application with this SDK over C# and other .NET ... > and most of my SDK API function return a status code that define as a enum ...
    (microsoft.public.dotnet.languages.vc)
  • Re: What do you use as symbols for Python ?
    ... > enum OBJECT_STATE ... > In CAML or Haskell I would use the union types: ... Antoon Pardon ... Prev by Date: ...
    (comp.lang.python)
  • Re: Enumerations as Counters
    ... The enum now has two names which make no sense to anyone using your enum ... > SecondValue, ... > ThirdValue, ... > FourthValue ...
    (microsoft.public.dotnet.languages.csharp)