Click here to Skip to main content
15,894,343 members
Articles / Programming Languages / C#

Passing Enum type as a parameter

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
30 Aug 2011CPOL 7.8K  
"we cannot pass a Type as a function parameter" ???Yes we can. Just look at the parameter of Enum.GetValues for example._______Generic functions are unnecessary here. Just use Object.GetType to, um, get the type.private Enum GetNextEnum(object currentlySelectedEnum){ Type...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions