我正在尝试使用委托来减少这个项目中的代码。我的asp.net页面中有4个DropDownLists。在我的代码隐藏文件中,我使用数据将它们绑定到不同的业务对象调用。();EEList.DataSource = bl.getEE();这似乎真的很重复,所以我决定创建一个函数作为捷径SourceAndBind(InstructorList, b
为什么第一个和第三个表达式工作,而不是第二个? int x1 = new Func<int>(() => 0); //doesn't work --Cannot convert source type 'System.Func<int>' to target type 'int'
int x2 = new Func<string,int>((x) => 0)(