S
shapper
Hello,
I got the following code from an online example:
public static void Repeater<T>(this HtmlHelper html,
IEnumerable<T> items, string className, string classNameAlt, Action<T,
string> render) {
int i = 0;
items.ForEach(item => {
render(item, (i++ % 2 == 0) ? className: classNameAlt
});
}
ForEach is not recognized.
I imported System, System.Collections, System.Collections.Generic,
System.Linq, ...
Am I missing something?
Thanks,
Miguel
I got the following code from an online example:
public static void Repeater<T>(this HtmlHelper html,
IEnumerable<T> items, string className, string classNameAlt, Action<T,
string> render) {
int i = 0;
items.ForEach(item => {
render(item, (i++ % 2 == 0) ? className: classNameAlt
});
}
ForEach is not recognized.
I imported System, System.Collections, System.Collections.Generic,
System.Linq, ...
Am I missing something?
Thanks,
Miguel