H
harry
Hi,
Has anyone a link or basic intro to Reflection?
I need to find and instantiate a particular class based on user input at run
time.
For instance, Class1 may add 2 numbers, Class2 may subtract 2 numbers. Only
the user at runtime selects which they wish to use. How would I find the
correct class?
This is just a simple example of my requirement. In the simple scenario
above I'd just hard code it, but what if I had 1,000 classes with different
algorythms, how would I find the correct one? For instance, can I select a
class by name at runtime?
I hope this explanation makes sense.
Thanks
Harry
Has anyone a link or basic intro to Reflection?
I need to find and instantiate a particular class based on user input at run
time.
For instance, Class1 may add 2 numbers, Class2 may subtract 2 numbers. Only
the user at runtime selects which they wish to use. How would I find the
correct class?
This is just a simple example of my requirement. In the simple scenario
above I'd just hard code it, but what if I had 1,000 classes with different
algorythms, how would I find the correct one? For instance, can I select a
class by name at runtime?
I hope this explanation makes sense.
Thanks
Harry