0

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!

EDIT:

I know that there are many similar questions, but the thing is, I simply can't get it to work :(

AndréB
  • 55
  • 7
  • 2
    Right click your project, click add references, go to existing project, select the project you wish to reference and that will be it! – Transcendent Nov 03 '16 at 00:34
  • @Transcendent I have done that, but what I need is to get some kind of list containing all the child classes that use the abstract FiltersAbstract class as base. Something like {"Filter1", "Filter2", "Filter3", "Filter4"} – AndréB Nov 03 '16 at 01:03
  • "I can't get it to work" isn't answerable. Please read [ask], share your code and explain what it does or doesn't do. – CodeCaster Nov 03 '16 at 07:49

0 Answers0