CSharp examples for System.Collections.Generic:IList
Is Valid Index in IList
public class Main{ public static bool IsValidIndex(System.Collections.IList collection, int index) {//from w ww.jav a2 s .c o m if(null != collection && 0 <= index && index < collection.Count && null != collection[index]) { return true; } else { return false; } } }