I have a list of numbers:
List<Int32> numbers = new List<Int32> { 1, 2, 5, 6, 18, 28, 40, 62 };
And the following class:
public class Measure {
public DateTime Created { get; set; }
public Int32 Value { get; set; }
}
I need to create a list of Measure where:
- Each Measure Value is one of the values listed;
- Each Measure Created is a day starting in DateTime.Now and incremented by one day.
So the list of Measure would be something like:
DateTime.Now, 1
DateTime.Now.AddDays(1), 2
DateTime.Now.AddDays(2), 5
...
Is it possible to create this list using Linq?