Let me just say that I would like to iterate over the string[][] value, add the value using an anonymous type and execute the general ForEach-Extension method as a result (a vivid example, I know, but I suppose you will get it because of this! )
Here is my code:
//attrs = some string[][] attrs.Select(item => new { name = HttpContext.GetGlobalResourceObject("Global", item[0].Remove(0, 7)), value = item[1] }) .ForEach</*????*/>(/*do stuff*/);
What exactly would I have to enter in Type-Parameter forEach?
Here's what ForEach looks like:
public static void ForEach<T>(this IEnumerable<T> collection, Action<T> act) { IEnumerator<T> enumerator = collection.GetEnumerator(); while (enumerator.MoveNext()) act(enumerator.Current); }
source share