Einar,
I haven't tested but I think you could write a generic tester using Reflection. Enum members are like field members of a class so might do with checking Type.FieldInfo.
Cetin
>Cetin,
>Hmm I guess I find that a flaw with the enum. I guess that means I have to add code to my method that accepts an enum as a parameter to ensure that the parameter passed is a member of that enum and I hope I can find a way to do this genericly so I don't have to hardcode this.
>Thanks for the information even if it wasn't what I wanted to hear :)
>Einar
>>Einar,
>>By definition (From "C# Language specification"):
>>"The set of values that an enum type can take on is not limited by its enum members. In particular, any value of the underlying type of an enum can be cast to the enum type, and is a distinct valid value of that enum type."
>>
>>You've to check what you get.
>>Cetin