【发布时间】:2016-08-12 06:12:44
【问题描述】:
Dim sipff As SystemInfoPropertiesForForm = listSystemInfoPropertiesForForm.Find(Function(f) f.ShowFieldPropertyTypeId = CInt(SystemInfoPropertyIds.ShowMilestone))
SystemInfoPropertiesForForm 是一个复杂类型,所有项目都可以为空。
CInt(SystemInfoPropertyIds.ShowMilestone) = 900
listSystemInfoPropertiesForForm 有 10 项
有什么想法吗?
【问题讨论】:
-
你的 .net 版本是什么?
-
f是什么数据类型?f.ShowFieldPropertyTypeId是什么数据类型?SystemInfoPropertyIds.ShowMilestone是什么数据类型? -
我的 .Net 版本是 4.0。 “f”是列表“listSystemInfoPropertiesForForm”的别名。 f.ShowFieldPropertyTypeId 是整数,SystemInfoPropertyIds.ShowMilestone = string,类型转换为 int。它的值将是 900
-
所以你想在对象列表(例如 listSystemInfoPropertiesForForm )中找到 ShowFieldPropertyTypeId=900 的 obj !?在这种情况下!?
-
Yes Cristic777..列表不为空,showfieldpropertytypeID 的值 = 900..但仍然出现错误
标签: asp.net vb.net entity-framework linq edmx