In the documentation, it shows that the generator can create specified numbers of Ids by using generator.Take(100). However the .NET compiler throws an error "Compilation error (line 10, col 28): 'IdGenerator' does not contain a definition for 'Take' and no accessible extension method 'Take'..."
using System;
using IdGen;
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
var generator = new IdGenerator(0);
var id = generator.Take(100);
}
}
Compilation error (line 10, col 28): 'IdGenerator' does not contain a definition for 'Take' and no accessible extension method 'Take' accepting a first argument of type 'IdGenerator' could be found (are you missing a using directive or an assembly reference?)
You need to add a using System.Linq since Take() is a Linq extension method. I thought that would be quote obvious since it's a well-known Linq method.
In the documentation, it shows that the generator can create specified numbers of Ids by using
generator.Take(100)
. However the .NET compiler throws an error "Compilation error (line 10, col 28): 'IdGenerator' does not contain a definition for 'Take' and no accessible extension method 'Take'..."