In C# I have a generic class:
public class MyGeneric<ParameterClass> where ParameterClass: MyGenericParameterClass, new() {
public static int Variable;
}
Now in C++ if I instantiated a templated class with different parameters each complete class would get it's own Variable
, so I just can't say
MyGeneric.Variable = 1; // invalid in C++
in C++, but seems like I can do so in C#.
I'd like to clarify...
If I have a generic with a static member variable is that variable shared among all generic instantiations?