Closed
Description
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.
- ID: 71a9e383-a525-2ab0-d275-94af99219dac
- Version Independent ID: 6884a0dc-d8c1-bbde-9675-a5940f8f5f0b
- Content: Uri.IsBaseOf(Uri) Method (System)
- Content Source: xml/System/Uri.xml
- Product: dotnet-api
- GitHub Login: @dotnet-bot
- Microsoft Alias: dotnetcontent