Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

infinit range loop c#

public IEnumerable<int> InfiniteCounter()
{
    int counter = 0;
    while (true)
    {
        unchecked
        {
            yield return counter;
            counter++;
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #infinit #range #loop
ADD COMMENT
Topic
Name
4+9 =