Hi,
I have situation to extend the Enumerable class in c# to add the new Range method that accepts long parameters. I cannot define the method like this
public static IEnumerable<long> Range(this Enumerable source, long start, long length)
{
for (long i = start; i < length; i++)
{
yield return i;
}
}
Since extension methods are accesible only through its objects. And it gives me an error
'System.Linq.Enumerable': static types cannot be used as parameters
Can someonce clarify me how to do this
Note: I know we can easily solve this without extension methods, but i needed this Enumrable class.
Cheers
Ramesh Vel