change
public class LinqHelper
to
public static class LinqHelper
Following points need to be considered when creating an extension method:
- The class which defines an extension method must be
non-generic
,static
andnon-nested
- Every extension method must be a
static
method - The first parameter of the extension method should use the
this
keyword.