.net Generic Calls <T>
- by Ryan
I have a function that accepts a generic parameter T that is of type class like so :
public Func<T, bool> MyMethod<T>(string paramName, object value) where T : class
But when calling the function I do not have direct access to the class that needs to be the parameter.
MyMethod<foo>("foo1", "foo2")
Is there a way I can get the class foo via other means like reflection so I can use the function?