Tag: itemcollection

基本的LINQexpression式为一个ItemCollection

我有一个我想用LINQ查询的ItemCollection 。 我尝试了以下(做作)的例子: var lItem = from item in lListBox.Items where String.Compare(item.ToString(), "abc") == true select item; Visual Studio不断告诉我Cannot find an implementation of the query pattern for source type 'System.Windows.Controls.ItemCollection'. 'Where' not found. Consider explicitly specifying the type of the range variable 'item'. Cannot find an implementation of the query pattern for source type 'System.Windows.Controls.ItemCollection'. […]