This is the definition:
public static IEnumerable<TResult> OfType<TResult>(this IEnumerable source);
How to replace TResult with something like:
Type.GetType("MyClass from assembly");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t. Generic arguments enforce type security at compile time while the
Type.GetTypeuses reflection and is not known at compile time. What exactly are you trying to achieve?