Ejemplo n.º 1
0
        public Mylist <Mylist <int> > Generate(int numRows)
        {
            Mylist <Mylist <int> > result = new Mylist <Mylist <int> >();
            Mylist <int>           mylist = new Mylist <int>();

            if (numRows > 0)
            {
                mylist.Add(0, 1);
                result.Add(0, mylist);
                for (int i = 1; i < numRows; i++)
                {
                    result.Add(i, GetNextLevel(result.GetbyKey(i - 1)));
                }
            }

            return(result);
        }