Skip to content

Implement CA1036: Add missing comparison operators to IComparable<T> types#11733

Open
Hualii wants to merge 1 commit into
dotnet:mainfrom
Hualii:main
Open

Implement CA1036: Add missing comparison operators to IComparable<T> types#11733
Hualii wants to merge 1 commit into
dotnet:mainfrom
Hualii:main

Conversation

@Hualii

@Hualii Hualii commented Jun 26, 2026

Copy link
Copy Markdown

This PR addresses issue #10271 by implementing CA1036 (Override methods on comparable types) for the following types:

  • GlyphLookupRecord: Added <, >, <=, >= operators
  • TextEffectBoundary: Added , Equals, GetHashCode, and comparison operators
  • ValidatedPartUri: Added Equals, GetHashCode, and comparison operators
  • MemoryStreamBlock: Added , Equals, GetHashCode, and comparison operators

All implementations follow the CA1036 rule requirements:

  • Provide Equals(object) and GetHashCode()
  • Provide ==, !=, <, >, <=, >= operators

Fixes #10271

Microsoft Reviewers: Open in CodeFlow

…types

- GlyphLookupRecord: Add <, >, <=, >= operators
- TextEffectBoundary: Add  Equals, GetHashCode, and comparison operators
- ValidatedPartUri: Add Equals, GetHashCode, and comparison operators
- MemoryStreamBlock: Add Equals, GetHashCode, and comparison operators

Fixes dotnet#10271
@Hualii Hualii requested a review from a team June 26, 2026 08:51
@Hualii Hualii requested a review from a team as a code owner June 26, 2026 08:51
@amarinov-msft amarinov-msft added the PR metadata: Label to tag PRs, to facilitate with triage label Jun 26, 2026
@Hualii

Hualii commented Jun 26, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CA1036: Override methods on comparable types

2 participants