示例#1
0
        public int size()
        {
            zCList <T> listTemp = this;
            int        temp     = this.Address;
            int        idx      = 0;

            while ((temp = listTemp.Next) != 0)
            {
                listTemp = new zCList <T>(temp);
                idx++;
            }

            return(idx);
        }
示例#2
0
        public T get(int index)
        {
            zCList <T> listTemp = this;
            int        temp     = this.Address;
            uint       idx      = 0;

            while ((temp = listTemp.Next) != 0)
            {
                listTemp = new zCList <T>(temp);
                if (idx == index)
                {
                    T val = new T();
                    val.Initialize(listTemp.Data);
                    return(val);
                }
                idx++;
            }

            return(null);
        }