remove value from IList - CSharp System.Collections.Generic

CSharp examples for System.Collections.Generic:IList

Description

remove value from IList

Demo Code


using System.Collections;
using System;/* w  w  w . j  a  v a  2s  .c o m*/

public class Main{
    public static bool remove(IList collection, object value)
      {
         bool b = collection.Contains(value);
         if (b)
            collection.Remove(value);
         return b;
      }
}

Related Tutorials