Arebis.UnitsAmounts.Standard.Units 2.0.8109

dotnet add package Arebis.UnitsAmounts.Standard.Units --version 2.0.8109
NuGet\Install-Package Arebis.UnitsAmounts.Standard.Units -Version 2.0.8109
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Arebis.UnitsAmounts.Standard.Units" Version="2.0.8109" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Arebis.UnitsAmounts.Standard.Units --version 2.0.8109
#r "nuget: Arebis.UnitsAmounts.Standard.Units, 2.0.8109"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Arebis.UnitsAmounts.Standard.Units as a Cake Addin
#addin nuget:?package=Arebis.UnitsAmounts.Standard.Units&version=2.0.8109

// Install Arebis.UnitsAmounts.Standard.Units as a Cake Tool
#tool nuget:?package=Arebis.UnitsAmounts.Standard.Units&version=2.0.8109

About

Arebis.UnitsAmounts is a .Net library for implementing strongly typed units and amounts.

More information is to be found in the original contribution at Arebis Units Amounts.

How to Use

The following code comes from a console application demo program.

namespace SampleConsoleApplication
{
    using System;
    using Arebis.StandardUnits;
    using Arebis.UnitsAmounts;

    internal class Program
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "<Pending>")]
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0058:Expression value is never used", Justification = "<Pending>")]
        private static void Main(string[] args)
        {
            // Just a sample case:
            // ===================

            // To allow using units by name, we'll register all units declared in the "StandardUnits" assembly:
            UnitManager.RegisterByAssembly(typeof(Arebis.StandardUnits.SIUnitTypes).Assembly);

            // I'm driving in a car driving at 70 Miles per hour:
            var carSpeed = new Amount(70.0, SpeedUnits.MilePerHour);

            // I throw an apple forward through the window at 4 meter per second:
            var relativeAppleSpeed = new Amount(4.0, "meter/second");

            // So the absolute speed of the apple flowing through the air:
            var absoluteAppleSpeed = carSpeed + relativeAppleSpeed;

            // Display the result in km/h:
            Console.WriteLine("Absolute speed of the apple: {0:#,##0.00 US|kilometer/hour}", absoluteAppleSpeed);

            Console.WriteLine();
            Console.WriteLine("Press ENTER to end.");
            Console.ReadLine();
        }
    }
}

Key Features

  • Full typed units and amounts;
  • Numerical operations between the typed units;
  • Formatting of typed units values;

Main Types

The main types provided by this library are:

  • Unit Defines a physical units such as meter, kilogram, second, newton, etc.
  • Amount Consists of a numerical (double precision type) value and a Unit.

Feedback

Arebis.UnitsAmounts is released as open source under the MIT license. Bug reports and contributions are welcome at the Units Amounts repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.8109 196 5/28/2022