Files
mirror-processhacker/1.x/trunk/ProcessHacker.Common/Linq/Query Operators/Generation Operators.cs
T
wj32 7bd28e4357 moved branches, tags, trunk to 1.x branch
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2304 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-10-25 02:22:46 +00:00

27 lines
536 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace System.Linq
{
public static partial class Enumerable
{
public static IEnumerable<int> Range (int start, int count)
{
for (int i = 0; i < count; i++)
yield return i + start;
}
public static IEnumerable<TResult> Repeat<TResult> (TResult element, int count)
{
for (int i = 0; i < count; i++)
yield return element;
}
public static IEnumerable<TResult> Empty<TResult> ()
{
yield break;
}
}
}