我有一個類,並有一個列表,這個班,我想補充一個Where
功能上我的課調用列表的Where
功能,事情是這樣的:添加功能上我的課
public class MyClass<T> where T : class
{
public Func<T, IEnumerable<T>> Where{ get; set; }
public List<T> mylist = new List<T>();
public MyClass()
{
Where = mylist.Where;
}
}
,我發現了錯誤:
No overload for 'Where' matches delegate 'Func<T, IEnumerable<T>>
能否請你解釋它是如何是你打算使用你的'Where'屬性? – Enigmativity