Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 503 Bytes

README.md

File metadata and controls

13 lines (7 loc) · 503 Bytes

This package allows you to foreach over a range using C# 9.0's extension GetEnumerator.

The loop is inclusive start, exclusive end. Therefore foreach(var i in 1..3) Console.Write(i + ","); will print 1,2, not 1,2,3.

NuGet

https://www.nuget.org/packages/RangeForeach/0.0.1

  • nuget package manager: Install-Package RangeForeach -Version 0.0.1
  • .net CLI: dotnet add package RangeForeach --version 0.0.1
  • package reference <PackageReference Include="RangeForeach" Version="0.0.1" />