MeiChun-Lo / morelinq

Automatically exported from code.google.com/p/morelinq
Apache License 2.0
0 stars 0 forks source link

SelectWithIndex (or something similar) #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've seen a number of questions like this one: 
http://stackoverflow.com/questions/1593235/linq-to-xml-dictionary-conversion

Where the overload for Select taking a `Func<TSource,int,TResult>` is 
basically used to create key/value pairs. We should make this easier with a 
single method call - either using KeyValuePair or a new IndexValuePair 
struct.

Original issue reported on code.google.com by jonathan.skeet on 20 Oct 2009 at 8:52

GoogleCodeExporter commented 9 years ago
SelectWithIndex is, IMO, the existing overload of Select.
What he was asking sounds to me to be an overload of ToDictionary where the Key 
selector includes an index parameter.

Original comment by tormod.s...@gmail.com on 16 Jun 2012 at 11:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 07ebb1349a1d
The operator is simply called Index.

Original comment by azizatif on 16 Jun 2012 at 4:28

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 16 Jun 2012 at 4:29