A project, by itself using .Net features, cannot hold multiple "versions" of a class in the sense that you cannot decide, at runtime, which version you want:
public static void Main(string[] args)
{
var myAdditionObject = myCalculatorAssembly.Get<Addition>("version1");
}
There is no such a thing in .Net. If you want to properly version releases of your assembly learn semantic versioning and properly version your releases.
Now, having said that, you could provide your own mechanism by consumig through an interface:
// In your library:
public interface IAddition
{
double Add(double x, double y);
}
public class AdditionV1 : IAddition
{
public double Add(double x, double y)
=> x + y;
}
public class AdditionV2 : IAddition
{
public double Add(double x, double y)
{
// Your V2 implementation.
...
}
}
// Then, when consuming from an external project that referenes your DLL:
public static void Main(string[] args)
{
IAddition addition = new AdditionV2(); // Or AdditionV1 or any other "version".
}
This way you instantiate the version you want.