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

CreateDerivedCollection unnecessarily tries to cast IEnumerable<T> to IList<T> #68

Closed
Aesir opened this issue Jun 14, 2012 · 1 comment
Labels

Comments

@Aesir
Copy link

Aesir commented Jun 14, 2012

CreateDerivedCollection is an extension method on IEumerable but for some reason creates a superfluous variable

var thisAsColl = (IList<T>)This;

that is only used once later to cast it back to an IEnumerable

var origEnum = (IEnumerable<T>)thisAsColl;

This limits limits you to collection types that implement IList (and causes unexpected exceptions when you don't). No features on IList are used within the method.

@shiftkey
Copy link
Contributor

Close this sucker

@lock lock bot added the outdated label Jun 26, 2019
@lock lock bot locked and limited conversation to collaborators Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants