Click here to Skip to main content
15,881,559 members
Articles / Programming Languages / C#

A Dynamic Units of Measure Library in 9 Days

Rate me:
Please Sign up or sign in to vote.
5.00/5 (28 votes)
11 Feb 2020CPOL31 min read 37.8K   43  
This small library handles units of measure and quantities with a dynamic and multi-contexts approach.
I created this library because I needed to handle units of measure, mainly the ones from the SI (International System of Units) ones (but also possibly more esoteric ones) and quantities in a system where the quantities and their units must be persisted in a database and where different "contexts of units" can coexist (think multi-tenancy). In the article I go over: a bit about the metric system and dimensional equation, standard and binary prefixes, handling aliases, normalizing units, and parsing.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
spi
CEO Invenietis
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions