Task: Remove ISpanFormattable because it will cause collisions on .NET Standard #130
Labels
is:bug
Something isn't working
notes:breaking-change
Has changes that will break backward compatibility
pri:high
Milestone
The
ISpanFormattable
interface was copied from the BCL. This causes problems when using thenetstandard2.1
target fromnet6.0
because both places define the same interface (in theSystem
namespace).So, instead of redefining the
ISpanFormattable
interface to optimize number formatting, callers can useNumber
on .NET Standard and .NET Framework, since it also defines theTryFormat()
method. However, these older platforms have noTryFormat()
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 toJ2N.Numerics.Number
.The text was updated successfully, but these errors were encountered: