Use a parent parent class that is not shared.
public abstract class MyClass { public const string MyConstant = "fortytwo"; } public class MyClass<T> : MyClass {
This, of course, suggests that there is some reason why a constant should be part of a universal class; if it has public accessibility, I see no reason why you would not just put it in a separate class.
Having a non-core abstract parent class is a good idea for every class you generate; a generic class is actually a template for certain classes of subtypes, and not for a true parent, so having a true parent other than a parent can greatly facilitate some methods (for example, but not limited to).
source share