public int Hyperlinq_Foreach() { var sum = 0; foreach (var item in ListBindings.Select(source, item => item * 2)) { sum += item; } return(sum); }
public FatValueType Hyperlinq_Foreach() { var sum = default(FatValueType); foreach (var item in ListBindings.Select(source, item => item * 2)) { sum += item; } return(sum); }
public int Hyperlinq_For() { var items = ListBindings.Select(source, item => item * 2); var sum = 0; for (var index = 0; index < items.Count; index++) { sum += items[index]; } return(sum); }
public FatValueType Hyperlinq_For() { var items = ListBindings.Select(source, item => item * 2); var sum = default(FatValueType); for (var index = 0; index < items.Count; index++) { sum += items[index]; } return(sum); }
public void Select_SelectorAt_With_ValidData_Must_Succeed(int[] source, NullableSelectorAt <int, string> selector) { // Arrange var list = source.ToList(); var expected = Enumerable .Select(source, selector.AsFunc()); // Act var result = ListBindings .Select(list, selector); // Assert _ = result.Must() .BeEnumerableOf <string>() .BeEqualTo(expected, testRefStructs: false); _ = result.SequenceEqual(expected).Must().BeTrue(); }