Open
Description
The ISpanFormattable
interface was copied from the BCL. This causes problems when using the netstandard2.1
target from net6.0
because both places define the same interface (in the System
namespace).
So, instead of redefining the ISpanFormattable
interface to optimize number formatting, callers can use Number
on .NET Standard and .NET Framework, since it also defines the TryFormat()
method. However, these older platforms have no TryFormat()
method on any of the numeric value types,
Internally, we can generally patch this up by using the static TryFormat()
methods directly. Both internally and publicly, we can support J2N numeric reference types by casting to J2N.Numerics.Number
.