Fluent API support? #1117
alexanderfedin
started this conversation in
Ideas
Replies: 1 comment
-
Hi, check out https://www.nuget.org/packages/UnitsNet.NumberExtensions/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Did you think of adding fluent-like APIs:
var speed = 12.Meters() / 3.5.Seconds();
where:
public static class DistanceFluentDSL
{
public static Distance Meters(this int v) => new Distance(v, Unit.Meters);
public static Distance Meters(this double v) => new Distance(v, Unit.Meters);
}
Beta Was this translation helpful? Give feedback.
All reactions