Lambda for Dummies….anyone, anyone? I think not
Let’s dissect your code sample: filenames.SelectMany(f => Assembly.LoadFrom(f).GetCustomAttributes(typeof(PluginClassAttribute), true) .Cast<PluginClassAttribute>() .Select(a => a.PluginType) ).ToList(); So, we start off with a string[] called filenames. We invoke the SelectMany extension method on the array, and then we invoke ToList on the result: filenames.SelectMany( … ).ToList(); SelectMany takes a delegate as parameter, in this case the delegate must … Read more