Skip to content

Task: Remove ISpanFormattable because it will cause collisions on .NET Standard #130

Open
@NightOwl888

Description

@NightOwl888

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugSomething isn't workingnotes:breaking-changeHas changes that will break backward compatibilitypri:high

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions