我有两个集合,我必须进行连接才能获得一个值,但是当我尝试它时会抛出错误。
//代码:
Dim ExclusiveComment As ExclusiveComments = Nothing
ExclusiveComment = From ExclusiveCommentLinq In Me.ExclusiveCommentsCollection
Join ExistingCommentsLinq In Me.CombinedExclusiveCommentsCollection On ExclusiveCommentLinq.CommentDescription Equals ExistingCommentsLinq(0)
Select ExclusiveCommentLinq
在上面的代码中,
ExclusiveCommentsCollection
= 类集合(ExclusiveComments)
CombinedExclusiveCommentsCollection
= 常规字符串集合(单列)
两个集合都有共同的列“ CommentDescription
”,我需要从中获取值ExclusiveCommentsCollection
。
你能告诉我我错在哪里以及如何做到这一点吗?
错误:
选项严格禁止从 'System.collections.generic.ienumarable(Of ExclusiveComments 到 ExclusiveComments) 的隐式转换