Iterates the range between the start and end values.
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public IEnumerable<T> Iterate(
Func<T, T> increment
)
Public Function Iterate (
increment As Func(Of T, T)
) As IEnumerable(Of T)
member Iterate :
increment : Func<'T, 'T> -> IEnumerable<'T>
Parameters
- increment
- Type: SystemFuncT, T
Delegate to increment the value for each iteration of the enumerable.
Return Value
Type:
IEnumerableT[Missing <returns> documentation for "M:Eto.Forms.Range`1.Iterate(System.Func{`0,`0})"]
Remarks
This can be used to return an enumerable that iterates between the start and end of the range given the
specified increment function.
Examples
var intRange = new Range<int>(1, 200);
foreach (var item in intRange.Iterate(i => i + 1))
{
}
var dateRange = new Range<DateTime>(DateTime.Today, DateTime.Today.AddDays(2));
foreach (var item in dateRange.Iterate(i => i.AddMinutes(1)))
{
}
See Also