CSharp examples for System.Collections:ICollection
Is In Collection
using System.Globalization; using System.Collections.Generic; using System.Collections; using System;/*www. j a v a 2 s .c om*/ public class Main{ /// <summary> /// /// </summary> /// <typeparam name="U"></typeparam> /// <param name="collection"></param> /// <param name="value"></param> /// <returns></returns> public static bool IsInCollection<U> (ICollection<U> collection, U value) { if (collection == null || value == null) return false; return collection.Contains (value); } }