I'm creating some extension methods and I'm getting some errors with RadComboBoxItemCollection, RadComboBoxItemCollection appears to implement IEnumerable but linq keeps giving me errors saying:
"Could not find an implementation of the query pattern for source type 'Telerik.Web.UI.RadComboBoxItemCollection'. 'Where' not found. Consider explicitly specifying the type of the range variable 'myItem'."
from this code
public static bool ContainsValue(this RadComboBoxItemCollection myList, string value)
{
bool matches = (from myItem in myList where myItem.Value == value select myItem).Count() > 0;
return matches;
}
on the flip side RadListBoxItemCollection works just fine
public static bool ContainsValue(this IEnumerable<RadListBoxItem> myList, string value)
{
bool matches = (from myItem in myList where myItem.Value == value select myItem).Count() > 0;
return matches;
}
I tried doing IEnumerable and this solves the linq errors but I get this error
"Instance argument: cannot convert from 'Telerik.Web.UI.RadComboBoxItemCollection' to 'System.Collections.Generic.IEnumerable'"