当我尝试循环到一个集合时,我得到了异常。
//代码
fieldFormatDropDown.DataSource = From FieldFormatLinq In fieldFormatsCollection Where FieldFormatLinq.DataTypeId = dataTypeId And FieldFormatLinq.IsActive = True
//例外:
The method or operation is not implemented
为什么我得到这个?
答案 0 :(得分:1)
尝试转换为Tolist()
。
//代码
fieldFormatDropDown.DataSource = (From FieldFormatLinq In fieldFormatsCollection Where FieldFormatLinq.DataTypeId = dataTypeId And FieldFormatLinq.IsActive = True).ToList()