I have something like the following situation below:
class Base { public static int x; public int myMethod() { x += 5; ret
Static dictionary with Type as keys should do. I mean avoid logic repetition and different values for each derived type but shared among instances.
public class Base { private static Dictionatry _values; public int MyMethod() { _values[this.GetType()]+=5; return _values[this.GetType()]; } }