mercredi 2 novembre 2016

Get the classes from another project [duplicate]

This question already has an answer here:

I just started to learn C# for a school project but I'm stuck on something.

enter image description here

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