using System.Collections.Generic;
public static void Main()
var c = new[]{1, 2, 3, };
var s = c.Sumi((x, i) => i % 2 == 0 ? x * 2 : x);
public static class LinqExtensions
public static int Sumi(this IEnumerable<int> source, Func<int, int, int> selector) => source.Select(selector).Sum();