Passing Enum type as a parameter [Tip/Trick]
Posted: 24 Aug 2011
Updated: 24 Aug 2011
Views: 790
Rating: 0.0 / 5
Votes: 0
Popularity: 0.0
Licence: The Code Project Open License (CPOL)
Bookmarked: 0
Downloaded: 0
I think the compile time force for a little enum enforcement would look something like this... (excuse the bad syntax, doing it from memory)private T GetPreviousEnum(this T currentlySelectedEnum) where T: structStackOverflow has a good question and answer in relation to it here.[^].