Eric Yin
Eric Yin

Reputation: 8993

How to check Uris for equality excluding the query part?

The default Uri.Equals() method only ignores user information (UserInfo) and the fragment (Fragment).

Is there any method that compares for equality and ignores Query as well?

Upvotes: 3

Views: 420

Answers (1)

Jon
Jon

Reputation: 437414

Uri.Compare allows you to specify which parts should be involved in the comparison by passing in a UriComponents value.

Upvotes: 10

Related Questions