Skip to content

Unobsolete IPAddress.Address, or create a new equivalent property #68619

Open
@antonfirsov

Description

@antonfirsov

Forking #68591 (comment) to a new issue.

IPAddress.Address is the most efficient way to get the IPv4 value, however it doesn't make sense and throws for IPv6, so we made it obsolete.

We should consider unobsoleting it or creating a new, equivalent property with a name that describes the purpose and the limitations better, for example:

public class IPAddress
{
    public long IPv4Value { get; }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Net

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions