Пример #1
0
        // Constructor

        public static IEnumerable <ulong> Get()
        {
            var pg = PrimegenStruct.Create();

            primegen_init(ref pg);
            while (true)
            {
                yield return(primegen_next(ref pg));
            }
        }
Пример #2
0
 private static extern ulong primegen_next(ref PrimegenStruct pg);
Пример #3
0
 private static extern void primegen_init(ref PrimegenStruct pg);