Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// definitions
public abstract class ClassConstraint<TClass>
where TClass : class
public class GenericClassWhereIWantTEnumRestricted<TEnum>
where TEnum : struct, TClass
public class EnumConstraint : ClassConstraint<Enum> {
// usage
var x = new EnumConstraint.GenericClassWhereIWantTEnumRestricted<MyEnum>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment