tail Set IList - CSharp System.Collections.Generic

CSharp examples for System.Collections.Generic:IList

Description

tail Set IList

Demo Code


using System.Collections;
using System;/*  w  ww  . ja  v a2 s .c om*/

public class Main{
    public static ArrayList tailSet(IList list, int from)
      {
         ArrayList tailList = new ArrayList();
         for (int i = from; i < list.Count; i++)
            tailList.Add(list[i]);

         return tailList;
      }
    public static bool add(ICollection list, object value)
      {
         if (!((IList) list).Contains(value))
         {
            ((IList) list).Add(value);
            return true;
         }
         else
            return false;
      }
}

Related Tutorials