You need to specify the type, e.g.
Foo<int>.FoosHeight = 50;
or
Foo<Bar>.FoosHeight = 50;
but each is separate. Foo<int>.FoosHeight does not apply to Foo<Bar>.FoosHeight . They actually represent two separate classes with two different static fields. If you want the value to be the same for all Foo <>, then you need a separate place to store it, for example
FooHelper.FoosHeight = 50;
And FooHelper has no formal relationship with Foo <>.
Samuel neff
source share