instance = (T)typeof(T).GetProperty("Instance", BindingFlags.Static | BindingFlags.FlattenHierarchy | BindingFlags.Public).GetValue(null, new object[] { });
This will call the base class Instance property and return the singleton instance of the inherited T class.
It's a bit hard to explain in words... I still hope it helps someone ;)
No comments:
Post a Comment