Search code examples
c#.netvb.netmetric

Does anyone know a library for working with quantity/unit of measure pairs?


I would like to be able to do such things as

var m1 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Pounds);
var m2 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Liters);

m1.ToKilograms();
m2.ToPounds(new Density(7.0, DensityType.PoundsPerGallon);

If there isn't something like this already, anybody interested in doing it as an os project?


Solution

  • Check out the Measurement Unit Conversion Library on The Code Project.