'How to create DLL files for all the classes in an application while they have an internal relationship with each other?
I created a test project. I have two classes as follows:
class1:
namespace ConsoleApp1
{
public class calc1
{
public double num1 { get; set; }
public double num2 { get; set; }
private double _num1 { get; set; }
private double _num2 { get; set; }
public calc1(double num1, double num2)
{
_num1 = num1;
_num2 = num2;
}
public double Multiply()
{
return _num1 * _num2;
}
}
}
class2:
namespace ConsoleApp1
{
public class calc2
{
private static double _input;
public double input { get; set; }
public calc2(double input)
{
_input = input;
}
public double Calculate()
{
calc1 c = new calc1(_input, _input * 2);
return c.Multiply();
}
}
}
Program.cs:
using ConsoleApp1;
calc2 c = new calc2(12.3);
Console.WriteLine(c.Calculate());
Now, I want to create dll files for each of those classes. How can I create DLL files using a class library project? What is the best solution for creating DLL files for each class in a project and avoiding a single EXE application?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
