Usage

MoreLINQ can be used in one of two ways. The simplest is to just import the MoreLinq namespace and all extension methods become instantly available for you to use on the types they extend. In some very rare instances, however, this cause conflicts with other libraries you may be using that incidentally also extend the same type with an identically named method and signature. This happened with MoreLINQ, for example, when Microsoft .NET Framework 4.0 introduced Zip and MoreLINQ already had one. Starting with version 3.0 of MoreLINQ, you can reduce the potential for present (or even future) conflicts by individually importing just the extension methods you need using the static imports feature introduced in C# 6:

using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LeadExtension;

In the example above, only the Lag and Lead extension methods will be available in scope.

Apart from extension methods, MoreLINQ also offers regular static method that generate (instead of operating on) sequences, like Unfold, Random, Sequence and others. If you want to use these while statically importing other individual extension methods, you can do so via aliasing:

using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LeadExtension;
using MoreEnumerable = MoreLinq.MoreEnumerable;

In the example above, Lag and Lead will be available as extension methods as well as all the regular static methods on MoreEnumerable but without any of the extension methods offered by MoreEnumerable.

Usage

MoreLINQ can be used in one of two ways. The simplest is to just import the MoreLinq namespace and all extension methods become instantly available for you to use on the types they extend. In some very rare instances, however, this cause conflicts with other libraries you may be using that incidentally also extend the same type with an identically named method and signature. This happened with MoreLINQ, for example, when Microsoft .NET Framework 4.0 introduced Zip and MoreLINQ already had one. Starting with version 3.0 of MoreLINQ, you can reduce the potential for present (or even future) conflicts by individually importing just the extension methods you need using the static imports feature introduced in C# 6:

using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LeadExtension;

In the example above, only the Lag and Lead extension methods will be available in scope.

Apart from extension methods, MoreLINQ also offers regular static method that generate (instead of operating on) sequences, like Unfold, Random, Sequence and others. If you want to use these while statically importing other individual extension methods, you can do so via aliasing:

using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LeadExtension;
using MoreEnumerable = MoreLinq.MoreEnumerable;

In the example above, Lag and Lead will be available as extension methods as well as all the regular static methods on MoreEnumerable but without any of the extension methods offered by MoreEnumerable.

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.