Fan.Sys.Range.toList C# (CSharp) Method

toList() public method

public toList ( ) : List
return List
        public List toList()
        {
            int start = (int)m_start;
              int end = (int)m_end;
              List acc = new List(Sys.IntType);
              if (start < end)
              {
            if (m_exclusive) --end;
            acc.capacity(end-start+1);
            for (int i=start; i<=end; ++i)
              acc.add(Long.valueOf(i));
              }
              else
              {
            if (m_exclusive) ++end;
            acc.capacity(start-end+1);
            for (int i=start; i>=end; --i)
              acc.add(Long.valueOf(i));
              }
              return acc;
        }