So I have this custom object / static function that take a Type to call:
MyObject<MyType>.MyFunction();
MyObject is defined as such:
public abstract class MyObject <type> { ... }
How do I invoke it? The reason I need to do invoking is because MyType is dynamic, and I can’t do this:
Type t = this.GetType();
MyObject<t>.MyFunction();
You’d need to use reflection to instantiate the class – and then more reflection to invoke the method:
It’s unpleasant, certainly. Do you definitely need it to be a method in a generic class?