Z
Zark3
Hello all,
Is there a way to find all classes that are derived from a specific
base type?
Within the namespace of my project i define a base type that may be
inherited for future expansion, so when checking for this class i need
to know all specific implemented types.
Right now I have a code snippet like:
Type[] types = new Type[] { typeof(FileData),
typeof(FileData_Image) };
foreach (Type t in types) {
(...)
What I would ideally like to have is something like:
Type[] types =
typeof(myBaseType).GetAllClassesThatDeriveFromThisClass("withinMyNamespace");
foreach (Type t in types) {
(...)
Is this possible?
Chris
Is there a way to find all classes that are derived from a specific
base type?
Within the namespace of my project i define a base type that may be
inherited for future expansion, so when checking for this class i need
to know all specific implemented types.
Right now I have a code snippet like:
Type[] types = new Type[] { typeof(FileData),
typeof(FileData_Image) };
foreach (Type t in types) {
(...)
What I would ideally like to have is something like:
Type[] types =
typeof(myBaseType).GetAllClassesThatDeriveFromThisClass("withinMyNamespace");
foreach (Type t in types) {
(...)
Is this possible?
Chris