Can someone explain why the following expression evaluates to true? There must be some historical perspective that I’m just missing.
new Uri("mailto:somebody@example.com") == new Uri("mailto:somebodyelse@example.com")
I would understand:
- A use case for a separate Uri.Compare method giving the caller control over which components should be compared;
- If Uri.Equals performed its comparison against canonicalized URIs.
The docs say that the user info, fragment, and (in older .NETs) query are all ignored for comparison. There is no mention for the email address in a mailto; however.
What? Why?
[tags].NET, C#, Microsoft, BCL[/tags]





