c# yield return ienumerable

63

c# yield return ienumerable -

public static IEnumerable<int> Numbers(int max)
{
    for(int i = 0; i < max; i++) 
    {
        yield return i;
    }
}

Comments

Submit
0 Comments