Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVersionInfo.CompareTo() should use a generic #235

Open
dfar-io opened this issue Feb 15, 2021 · 0 comments
Open

IVersionInfo.CompareTo() should use a generic #235

dfar-io opened this issue Feb 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dfar-io
Copy link
Contributor

dfar-io commented Feb 15, 2021

Right now, the CompareTo() method for IVersionInfo accepts an object, which then has to be checked against to make sure the typing matches for the interface implementation. I think we can use a generic to enforce the typing, and use the language to enforce comparing against the right type.

Something like this in IVersionInfo.cs might do it:

public int CompareTo(T obj) {
      // perform comparisons here
}
@dfar-io dfar-io added the enhancement New feature or request label Feb 15, 2021
@dfar-io dfar-io self-assigned this Feb 15, 2021
@dfar-io dfar-io removed their assignment Mar 1, 2021
@mscottford mscottford moved this to Backlog in Freshli Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Icebox
Development

No branches or pull requests

1 participant