/Tare

A simple, dynamic C# quantity library for units of measure value types.

Primary LanguageC#MIT LicenseMIT

api documentation | contributions | changelog

Tare

A simple, dynamic library for a unit of measure value type.

Sample

var length1 = Quantity.Parse("1.5 m");
var length2 = Quantity.Parse("13 in");

var totalLength = length1 + length2;
Console.WriteLine(totalLength.Format("m"))); // "1.8302 m"

if (length1 > Length2)
    Console.WriteLine("Length 1 is greater than length 2");

Quantity scalar = 3;

var lengthMultiple = Length1 * scalar;
Console.WriteLine(lengthMultiple.Format("ft")); // "14.7638 ft"