- changed status to closed
Tutorial for Enumerable .Select
Issue #61
closed
Hi
I can't get .Select to work, even though looking at the code online it seems there is a Select function.
I have a IDictionary<string, T> I'm doing a
IDictionary<string, T>.Where( ... predicate...)
, which returns a list of <string,T>.
So far so good. However I want to return a list of T, so I wanted to chain the above snippet with .Select() but it seems this is not possible.
I've tried doing a .Select on a IEnumerable directly but in vain.
I'm not sure if this is the appropriate channel to ask for a sample code for Select.
Comments (2)
-
repo owner -
reporter I did not know that all the fun was happening on GG. I was searching on SO. Thanks for your support.
- Log in to comment
Hi,
some methods are not part of IEnumerable because interface methods cannot have generic type parameters.
You can do it like this:
or if the predicate does not need the key for its evaluation:
For further questions please refer to https://groups.google.com/forum/#!forum/spring4d