我有:
public void InitializeStatusList(DropDownList list)
{
var dictionaryEntries = GetEntriesFromDatabase();
list.DataSource = dictionaryEntries.Where(entry => entry is EntryStatus1 || entry is EntryStatus2);
list.DataBind();
}
我有很多这样的函数。我想编写通用函数,并将dictionaryEntries
查询条件作为谓词传递。
例如:
public void InitializeStatusList(DropDownList list)
{
CommonInitializeStatusList(DropDownList list, entry => entry is EntryStatus1 || entry is EntryStatus2);
}
public void CommonInitializeStatusList(DropDownList list, ??????????????? predicate)
{
var dictionaryEntries = GetEntriesFromDatabase();
list.DataSource = dictionaryEntries.Where(predicate);
list.DataBind();
}
什么是???????????????
的缩写?
提前致谢。