Fan.Sys.List.get C# (CSharp) Method

get() public method

public get ( int i ) : object
i int
return object
        public object get(int i)
        {
            try
              {
            if (i >= m_size) throw IndexErr.make(""+i).val;
            return m_values[i];
              }
              catch (IndexOutOfRangeException)
              {
            throw IndexErr.make(""+i).val;
              }
        }

Same methods

List::get ( long index ) : object

Usage Example

Example #1
0
        public override long compare(object obj)
        {
            Version that = (Version)obj;
            List    a    = this.m_segments;
            List    b    = that.m_segments;

            for (int i = 0; i < a.sz() && i < b.sz(); i++)
            {
                long ai = (a.get(i) as Long).longValue();
                long bi = (b.get(i) as Long).longValue();
                if (ai < bi)
                {
                    return(-1);
                }
                if (ai > bi)
                {
                    return(+1);
                }
            }
            if (a.sz() < b.sz())
            {
                return(-1);
            }
            if (a.sz() > b.sz())
            {
                return(+1);
            }
            return(0);
        }
All Usage Examples Of Fan.Sys.List::get