You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IPAddress already provides TryFormat/TryParse methods. It should implement the appropriate interfaces to go along with these. Doing that for IPAddress, for example, means the IPAddress's TryFormat will be used as part of string interpolation rather than its ToString() being used.
API Proposal
namespace System.Net
public class IPAddress
+ : ISpanFormattable, ISpanParsable<IPAddress>
{
// all of the interface members implemented explicitly
}
API Usage
IPAddressaddress= ...;strings=$"The address is {address}";