I am trying to create a LINQ expression in VB.NET. For some reason, I cannot get it to work.
Here are the references I have at the top of my class:
Here is the LINQ statement I have in one of my procedures:
Dim results = From p In PreImportData.AsEnumerable
Join c In EnhancedACTRulesData
On p.Field(Of String)("GroupID") Equals c.Field(Of String)("GroupID") _
And p.Field(Of String)("SubGroupID") Equals c.Field(Of String)("SubGroupID") _
And p.Field(Of DateAndTime)("ServiceStartDate") >= c.Field(Of DateAndTime)("RuleStartDate")
It does not like the ">=
" in my last condition.
If I remove this last condition, or change the ">=
" to "Equals
", it does not return any syntax errors.
I have searched a lot of code examples on the web, and see lots of uses of "=
", and "<=
", but it seems I cannot use any of those. The only one it seems to like is "Equals
Any idea why this is? Am I missing something?