I have a question regarding correct way to structure my application. I am a beginner on C# so excuse if I have some basis missing. I looked on the web(not only stackoverflow) but didn't find any answer, so maybe this is just because I am doing something wrong?
I have a project in which there are several classes to define my objects.
Object1.class.cs
Object2.class.cs ...
Now for some functions, I created class libraries (.dll files) to externalise the code. The idea is if I need to make an update, I just need to replace .dll file, and not all the code.
But I meet a problem when I want to send objects to that class, I think because they are external to the solution?
So I begin to wonder if I do it correctly.
1) Is there a way to send an object from my project to a class I created separately?
2) Is this a good idea to work this way? I mean, I could of course add the library in my project, but in that case I will not have separated .dll files, and all get in a single .exe file.
3) When I need to test my class, I always need to close my project, and open the class to edit it, then come back to my project to test it. Is there an easier way to do it?
Thanks in advance for your advises
Edit 2.
Simone Cifani perfercly answered to my question :
1) Classes must be externalised
2) Add references to necessary classes in my external libraries
3) Add references to each class and external libraries in my main project
As I don't know how to use Interfaces I will do without it, but I think all will be fine even without.
A very common way to externalize part of the code is by using interfaces.
A simple example is: