Open Mrxx99 opened 4 months ago
Instead of single class with multiple constants, I'd prefere one class per value.
Usage:
Console.WriteLine((new Universe.Mathematics.Numbers.Integers.Five()).IntegerOfFive);
// prints 5.0123
Console.WriteLine((new Universe.Mathematics.Numbers.Decimals.Five.Zero.One.Two.Three()).FloatOfFiveDotZeroOneTwentyThree);
The class shall implement own interface, so mocking and IoC could be easy.
Magic numbers are evil, therefore a constant should be introduced for each. A codefixer should create a constant for each number that is not. All the constants should be created in one single class called Constants and the created name should be the written name of the number.
E.g.
Becomes