We can improve readability, writeability and maybe also performance (by avoiding unnecessary .Meters and .FromMeters) if we provide conversion to abstract.
As-is: Length abstractLength1 = Length.FromMeters(Math.Abs(length1.Meters))
To-be: Length abstractLength1 = length1.ToAbstract()
What do you think?
We can improve readability, writeability and maybe also performance (by avoiding unnecessary
.Metersand.FromMeters) if we provide conversion to abstract.As-is:
Length abstractLength1 = Length.FromMeters(Math.Abs(length1.Meters))To-be:
Length abstractLength1 = length1.ToAbstract()What do you think?