Jun
29
awarded Nice Question
Jun
24
asked Is there a Rosyln native plugin equivalent to Resharpers "Safe Delete" refactoring?
Jun
19
reviewed Approve suggested edit on An iOS app want to play flash video
Jun
19
reviewed Approve suggested edit on File Shows error
Jun
19
reviewed Approve suggested edit on Nginx module: how to get variables value from conf file
Jun
19
reviewed Approve suggested edit on Error 1146 while updating the column which has foreign key to table of another db in mysql
Jun
18
accepted Is this a bug in resharper?
Jun
18
comment Is this a bug in resharper?
I've played around with my code and subtle changes seem to make the warning flick on or off. Pretty sure now it's a resharper false positive.
Jun
18
comment Is this a bug in resharper?
@InBetween Resharper doesn't check the implementation AFAIK. It just see that you are passing the same IEnumerable to a method more than once. I
Jun
18
comment Is this a bug in resharper?
Yeah it does. I tried passing an IEnumerable and it flags it. Swap it with a List and it doesn't flag it.
Jun
18
comment Is this a bug in resharper?
I did a test. Have a look at the screen shot. Resharper is capable of understanding the difference.
Jun
18
revised Is this a bug in resharper?
added 269 characters in body
Jun
18
comment Is this a bug in resharper?
@DanielA.White but to satisfy your curiosity. List<PointVector2D> pointTangents = interp.Select(p => p.t.FastRotateAroundZ(Math.PI/2, p.t)).ToList(); is the assignment to pointTangents and is in the same scope as all the warnings.
Jun
18
comment Is this a bug in resharper?
@DanielA.White pointTangents.Last() is more maintainable, safer and readable than pointTangents[pointTangents.Count-1] And I'm not sure what you mean ''being passed in as an IEnumerable" You can't just assign an IEnumerable to a List without an explicit cast.
Jun
18
comment Is this a bug in resharper?
@DanielA.White It shouldn't matter what it is passed in as. It is a List and resharper is not meant to give this warning for lists.
Jun
18
comment Is this a bug in resharper?
@DanielA.White Because the implementation of First() is smart and if it is a list then it uses this[0]. Same goes with Last(). Anyway the question is not about micro-optimising the code.
Jun
18
revised Is this a bug in resharper?
added 18 characters in body
Jun
18
comment Is this a bug in resharper?
The question says that it is a list. List<Point2D> to be precise. Not IEnumerable<Point2D> which is why resharper should not be giving this warning.
Jun
18
asked Is this a bug in resharper?
Jun
17
awarded Necromancer
1 2 3 4 5