I was attempting to help someone else out and wrote this query:
var foundTab = (from tab in tabControl1.TabPages
where tab.Name == "tabName"
select tab).First();
And they reported that they received this error:
Could not find an implementation of the query pattern for source type System.Windows.Forms.TabControl.TabPageCollection'. 'Where' not found. Consider explicitly specifying the type of the range variable 'tab'.
I checked MSDN and TabPageCollection
implements IList
, ICollection
, IEnumerable
. So, what's going on here? What does that error mean and is there another way to query the Tab Control's TabPages
property?