IteratorTest.IntRange.GetNext C# (CSharp) Method

GetNext() public method

public GetNext ( int a, int b, int c, int d, int e ) : int
a int
b int
c int
d int
e int
return int
        public int GetNext(int a, int b, int c, int d, int e)
        {
            if (m_cont == null)
            {
                m_cont = new Continuation();
                m_cont.Mark();
                return m_cont.Store(0);
            }
            else
            {
                m_cont.Restore(1);
                throw new Exception("not reached");
            }
        }

Same methods

IntRange::GetNext ( ) : long

Usage Example

Exemplo n.º 1
0
        static void Main(string[] args)
        {
            IntRange r = new IntRange();

            long num = 9;

            num = r.GetNext(1, 2, 3, 4, 5);
            Console.WriteLine("first {0}", num);
            if(num == 1) {
                Console.WriteLine("err");
                return;
            }
            num = r.GetNext(6, 7, 8, 9, 10);
            Console.WriteLine("second {0}", num);
        }
All Usage Examples Of IteratorTest.IntRange::GetNext