Skip to content

[Uri.IsBaseOf(Uri) Method (System)] Remarks not clear #962

Closed
@xied75

Description

@xied75

When comparing two URIs (uri1 and uri2), uri1 is the base of uri2 if, when you ignore everything in uri2 after the last slash (/), the two URIs are identical.

Do you not also need to ignore everything from uri1 after the last slash as well?

Based on your example table, I think the pseudo code is like:

uri2.RemoveEverythingFromLastSlash().StartsWith(uri1.RemoveEverythingFromLastSlash())


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions