I would like to write Generic Method that would map List to new list, similar to JS\'s map method. I would then use this method like this:
var words= new Lis
The problem with your code is that PredicateList
.
Using a Func
is probably what you're looking for.
That being said, that code smells bad:
object
is less than usefulT
to an anonymous type won't help - you'll still get an object
back which has no useful properties.TResult
generic type parameter to your method, and take a Func
as an argument.