Tuesday, May 20, 2014

Python-like loops in C#

I just stumbled across this today as I was looking to use Enumerable.Range():

You can use Enumerable.Range(start, end), close to Python's own Range function.  For instance this should look familiar:

C#

Python

No comments:

Post a Comment