Why can I do the following :
Dim qNodes As IQueryable(Of XmlNode) = xDoc.ChildNodes.AsQueryable()
Dim test = qNodes.Where(Function(node) True)
although the following gives the error I stated in the title :
Dim qNodes As IQueryable(Of XmlNode) = xDoc.ChildNodes.AsQueryable()
Dim test = qNodes.Where(Function(node)
Return True
End Function)
?
I really don’t get it.
This is stated in section 11.1 of the VB.NET 10 Language Specification:
It is the restriction in the first item that you are running into. The introduction leaves plenty room to assume that this will be worked on in future releases, there’s much to be gained of course. Connect.microsoft.com is a good place to go to encourage them. I couldn’t check if a feedback item was already opened for this, the site is on the fritz right now.