The solution proposed by Anders Hejlsberg was to have an abstract class Calculator that has to be specialized for each primitive type. The generic type would then use an instance of the appropriate calculator to do the calculations. Here is the code (copied from Eric Gunnerson’s Blog): First define the abstract base class:
https://www.codeproject.com/Articles/8531/Using-generics-for-calculations

