This question already has an answer here:
- Get all derived types of a type 6 answers
I just started to learn C# for a school project but I'm stuck on something.
In the Program.cs of the Server project (red box), I'm trying to get a list (or something similar) that contains the name of those 4 classes from the Filters project (yellow box).
Those 4 filter classes are childs of a classes named "FiltersAbstract", which is an abstract class located in the Library project.
Ex:
Library:
public abstract class FiltersAbstract{}
Filters:
class Filter1 : FiltersAbstract{}
I've done reading about Reflection and LINQ and also some researching but haven't come across a solution that works for me.
So what I'm trying is to programmatically get some kind of list that contains all the FiltersAbstract child classes that are located in the Filters project.
Any help would be appreciated, thanks!
Aucun commentaire:
Enregistrer un commentaire