I have a sql stored procedure that I run that returns a class name. For example it returns “orange”. I have a class called “orange”. Is it possible to use that return string to access orange.GrabFiles?
Thanks!
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 use System.Reflection to get the class which you need and invoke the method you want to call.
To do this you can iterate though all types of the assembly and pick the right one for you. If you have special names you can use attributes to link a specific type with a special name.
Search the type
Invoke the method
With instance creation:
Without instance: