I\'m basically wanting to do this:
class UILockable : T
where T : UIWidget
{
}
However, this doesn\'t work. I\'ve seen people
You can't inherit from the generic type parameter. C# generics are very different from C++ templates. Inheriting from the type parameter requires the class to have a completely different representation based on the type parameter, which is not what happens with .NET generics. They are identical at the IL and native level (for all reference type arguments).