[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Collapse]Office File API
  Demo Application
  Redistribution and Deployment
 [Expand]Spreadsheet Document API
 [Expand]Word Processing Document API
 [Expand]PDF Document API
 [Expand]Excel Export Library
 [Expand]Snap Report API
 [Expand]Zip Compression and Archive API
 [Expand]Barcode Generation API
 [Collapse]Unit Conversion API
   Getting Started
  [Collapse]Examples
    How to: Convert Between Metric Prefixes
    How to: Convert Between Metric and US Units of Measurement
 [Expand]API Reference
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Convert Between Metric and US Units of Measurement

This example illustrates the use of a QuantityValue<T> object and the Unit Conversion API converters for calculating the volume and the mass of the water in the aquarium tank; followed by a display of the results using US and metric units.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4686.

For a US location, the output string looks like the following.

For a UK location, the output string looks like the following.

Is this topic helpful?​​​​​​​