Using C#, how can I take the min or max of two enum values?
For example, if I have
enum Permissions { None, Read, Write, Full }
is there a method that lets me do Helper.Max(Permissions.Read, Permissions.Full) and get Permissions.Full, for example?
Helper.Max(Permissions.Read, Permissions.Full)
Permissions.Full