/// <summary> /// Returns the values from the ListItemCollection for the items that aren't /// selected. This will attempt to convert the values to a generic type /// </summary> public static IEnumerable <T> NonSelectedValues <T>(this ListItemCollection value) { var values = value.NonSelectedValues(); if (values.Count() == 0) { return(new Collection <T>()); } return(values.Select(x => (T)Convert.ChangeType(x, typeof(T)))); }