Why did the anonymous type property "Points" still have the value "0"?
Public Class Test
Public Sub New(ByVal _ID As Integer)
ID = _ID
End Sub
Public ID As Integer
End Class
Dim list As New List(Of Test)
list.Add(New Test(1))
list.Add(New Test(2))
list.Add(New Test(3))
Dim query = From X In list Select New With {.Points = 0, X.ID}
For Each o In query
o.Points = 1
Next