-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NumberExtensions should not use Convert for net8.0 #1483
Comments
@angularsen Oh you're gonna love this: thanks to the |
Let's not bother with v5, it can receive new units and bug fixes, but new features can mostly just go into v6 so we can focus on finalizing and shipping it before it becomes an infinite project. Scope is definitely creeping. As for Good example though, something to consider when discussing My current thinking is, if the argument is WPF and XAML-like bindings, then value converters are a better approach than requiring all quantities to implement public class FooTests
{
#if NET48
[Fact]
public void Foo()
{
Mass newMass = NumberToMassExtensions.Kilograms(Mass.FromGrams(2000));
Assert.Equal(Mass.FromKilograms(2), newMass);
/*
Assert.Equal() Failure: Values differ
Expected: 2 kg
Actual: 2000 kg
*/
}
#endif
} |
Regarding the issue description, sounds good to me 👍 |
FYI, getting rid of |
I just noticed this simple performance improvement that's likely to have a huge performance impact on the
NumberExtensions
..Not sure if we want this in
v5
,v6
or I could just put itup-for-grabs
and leave it for later..Note that there is probably a
Convert.ToDecimal
somewhere, just waiting to popup as a merge conflict...The text was updated successfully, but these errors were encountered: