public Task<IEnumerable<long>> GenerateSubset(int fromIndex, int toIndex) { int first =fromIndex; int second = fromIndex + 1; int third = 0; List<long> result = new List<long>(); result.Add(first); result.Add(second); for (int i = fromIndex + 2; i <= toIndex - 1; i++) { third = first + second; result.Add(third); first = second; second = third; } yield return result; }
Quote:GenerateSubset is not iterator interface type.
GenerateSubset
Task<IEnumerable<long>>
List<long>
yield
IEnumerable<long>
fromIndex != 1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)