Skip to content

System.Net.IPNetwork parse CIDR issue #95865

@changhuixu

Description

@changhuixu

Description

The official documentation is too succinct that doesn't have much meaningful content.

Now, IPNetwork can parse simple CIDR string like this IPNetwork.TryParse("192.168.1.0/24", out var _)

but failed to parse

IPNetwork.TryParse("2001:0db8::1/64", out var _);

Is there a plan to improve this functionality?

Reproduction Steps

https://dotnetfiddle.net/0j9T3g

You can try this dotnet fiddle

Expected behavior

Can parse CIDR correctly.

Actual behavior

not yet

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8
Windows, x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions