|
-
Mar 12th, 2003, 08:53 AM
#1
Thread Starter
yay gay
(Another) Reflection question?
i have 2 projects and a dll...
the dll is the plugin abstract class im going to inherit from when doing plugins...
one project is the main app and the other project is the plugin.
the plugin project will inherit from the abstract class..and the main app thru reflection will invoke some methods of that class.
the problem is the following: my abstract class, and it's derived classes have its default constructor private and instead they have a one parameter constructor.
As many of the future plugin's will have many classes inside the assembly , when i do the :
Code:
foreach (Type type in types) {
i want to put a "if" to check whenever to use that class(the types that are derived from the plugin dll abstract class are used, the others are ignored) but i am finding the following problem:
to use the .IsSubClassOf() function i must create an instance of the class i want to analise...and the main app only has a reference to the abstract class but i cant create instances of abstract classes. So how would i know if a class from the plugins derivates from the abstract plugin class?
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|