Skip to content
| Marketplace
Sign in
Visual Studio>Templates>UnitsOfMeasurement
UnitsOfMeasurement

UnitsOfMeasurement

Marek Aniola

|
1,010 installs
| (0) | Free
Project template for creating Units of Measurement C# class library (.dll)
Download

Units of measurement

  • generated from a simple text definitions according to T4 text template.
  • generated as value types (structs): thus, dimensional analysis can be performed as a syntax check at compile time (dimensional issues displayed in Visual Studio as syntax errors).
  • for any of the fundamental dimensions: Length, Time, Mass, Temperature, ElectricCurrent, AmountOfSubstance, LuminousIntensity as well as Other (e.g. Money for currency units) and any of their combinations.
  • arithmetic (+, -, *, /) and comparison (==, !=, <, <=, >, >=) operators to perform calculations directly on quantities of unit type.
  • conversion of quantities between (compatible) units of measurement.

See GitHub for more details and sample applications.

👉 NOTE: There is a dotnet release for .NET Core / Standard available as a .NET Core template package.

Sample project screenshot

Preview.PNG

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft