Units of Measure will provide users with a Visual Studio solution that helps them handle measurement units easier and simpler within their C# projects.
With this particular component, you will spend less time calculating the parameters of various units and more on the important things in your daily work.
What's New in This Release:
Fixes Issue:
· Floating-point paranoia: {KilometerPerHour[123.45] != KilometerPerHour[123.45]}
· Host[Decimal|Double|Float].cs files have been modified to prevent conversion in such cases. Also, the order of floating-point operations has been changed to the one that looks a little more reasonable. Unit tests detected the change immediately and I had to modify them accordingly
Improvements:
· New method(s) UnitSystem.TryParse to parse string input into Quantities/Levels. See [Quantity|Level]Tests.cs source code on details on how to use it.
· Now UnitSystem constructor requires 2 parameters: int capacity and StringComparison lookup
· This allows to specify capacity of the system explicitly and to to choose between case-sensitive and case-insensitive lookups of unit symbols
· Sample systems SIUnits[Decimal|Double|Float].cs preseve parameterless constructor that creates UnitSystem with: capacity = 64, lookup = StringComparison.OrdinalIgnoreCase. The latter makes them behaving differently th...