I have a class:
public class Composite
{
int Width { get; set; }
int Distance { get; set; }
}
And 2 lists:
var widths = new List<int>(new[] {0, 1, 2, 3, 4 } );
var distances = new List<int>(new[] { 5, 6, 7, 8, 9 });
I want to create 5 Composite instances by combining the width and distance using the same index in the source lists:
- 0 & 5
- 1 & 6
- 2 & 7
- 3 & 8
- 4 & 9
I'm guessing some kind of join selecting into the composite but joined by the index of the source lists. Can anyone help please?