Hi,
I have a problem using linq and anonymous types in an asp.net vb.net application.
When I write the code above, I have 2 errors :
- "declarations of variable with Option Strinct On requires an As clause"
- "the name 'item' is not declared"
Does it mean that is not possible to use Option Strict On and Option Explicit On ?
Or I make a syntax error ?
Or is it just a bad configuration of my application ?
Thanks for your answsers
Regards
Mab
I have a problem using linq and anonymous types in an asp.net vb.net application.
When I write the code above, I have 2 errors :
- "declarations of variable with Option Strinct On requires an As clause"
- "the name 'item' is not declared"
VB.NET:
Public Sub MyFunc(ByVal xe As System.Xml.Linq.XElement)
Dim lstitems = From it In xe.Elements Select txt = it.@Text, value = it.@Value
For Each item In lstitems
Dim s As String = item.txt
Next
End Sub
Or I make a syntax error ?
Or is it just a bad configuration of my application ?
Thanks for your answsers
Regards
Mab