QuantityTypes 4.99.4
dotnet add package QuantityTypes --version 4.99.4
NuGet\Install-Package QuantityTypes -Version 4.99.4
<PackageReference Include="QuantityTypes" Version="4.99.4" />
paket add QuantityTypes --version 4.99.4
#r "nuget: QuantityTypes, 4.99.4"
// Install QuantityTypes as a Cake Addin
#addin nuget:?package=QuantityTypes&version=4.99.4
// Install QuantityTypes as a Cake Tool
#tool nuget:?package=QuantityTypes&version=4.99.4
# QuantityTypes
## Features
- [Strongly typed](http://en.wikipedia.org/wiki/Strong_typing) arithmetics of [physical quantities](http://en.wikipedia.org/wiki/Physical_quantity)
- Implemented as [value types](https://msdn.microsoft.com/en-us/library/s1ax56ch.aspx)
- Parsing from strings
- Formatting to strings
- Operators
- Unit conversion
- Extendable (create more quantity types, add units)
- Configurable (set default units for parsing and formatting)
- [NuGet package](QuantityTypes)
## Examples
``` csharp
Length s = 100 * Length.Metre;
Time t = 9.58 * Time.Second;
Velocity v = s / t;
Console.WriteLine(v);
Console.WriteLine(v.ToString("0.00[km/h]"));
Console.WriteLine("Speed: {0:0.00[!km/h] kmph}", v);
Mass m = Mass.Parse("92 kg");
double massInPounds = m / Mass.Pound;
Temperature temp = 100 * Temperature.DegreeCelsius;
double tempInFahrenheit = temp.ConvertTo(Temperature.DegreeFahrenheit);
```
# Change Log
## 5.0.0
### Added
- GitHub workflows (#113)
- Publish to GitHub packages (#114)
- Examples with System.Text.Json (#108)
### Removed
- net45 target (#109)
## 4.0.0
### Added
- Imperial units
- NaN, PositiveInfinity and NegativeInfinity quantities (#83)
- LinearMassDensity (#82)
- Scandinavian mile length unit (#88)
- Custom length example (#89)
### Changed
- Target netstandard1.3 and net45 (#97)
### Fixed
- Null reference exception in QuantityJsonConverter (#85)
- Migrate projects to netstandard (#94)
- TryParse of `null` should return `false` (#96)
## 3.0.1
### Changed
- IQuantity depends on IXmlSerializable - changed XML serialization (#62)
- Xml serialization without units (#66)
- Moved CSV functionality to QuantityTypes.Csv (#67)
- Moved dynamic types to separate project (#71)
- Signing the QuantityTypes assembly (#51)
### Added
- t/m^3 density unit (#80)
- TimeSpan extension methods (#43)
- Format with conversion, without showing unit (#52)
- Moment type (#11)
### Fixed
- lb/gal unit (#1)
## 2.0.1
### Changed
- Target netstandard 1.0
## 2.0.0
### Changed
- Target netstandard 1.1
## 1.1.0
### Added
- Torque units: N*cm, N*mm (#8)
- Use GitHub as source server (#12)
- Unit prefixes and operator overloads for electrical units
- Lighting calculations
### Changed
- Refactor UnitProvider.RegisterUnits to extension methods (#6)
- Rename DegreeKelvin to Kelvin and delete "degK" unit (#30)
- Case sensitive unit prefixes
- Switch PCL project to profile 328
### Fixed
- Support parsing of "'" units (#20)
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1 |
.NET Framework | net46 net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen30 tizen40 tizen60 |
Universal Windows Platform | uap uap10.0 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on QuantityTypes:
Package | Downloads |
---|---|
QuantityTypes.Csv
CSV extensions for QuantityTypes |
GitHub repositories
This package is not used by any popular GitHub repositories.