public class Test<T> where T : SomeBaseClass
But is there a way to restrict T to classes that exists in a namespace like
public class Test<T> where T in SomeNamespace
No. There''s no way to constrain a generic type to a namespace.