The same code on two different web sites (on the same solution), VB.Net (framework 3.5).
The Code:
Public Class UserTest
Public hhh As Integer
Public fff As String
Public Sub New(ByVal hh As Integer, ByVal ff As String)
Me.hhh = hh
Me.fff = ff
End Sub
End Class
Dim lst As List(Of UserTest) = New List(Of UserTest)
lst.Add(New UserTest(1, "x"))
lst.Add(New UserTest(2, "y"))
Dim myData = lst.Select(Function(o) New With {.id = o.fff, .name = o.hhh})
One select returns property’s names with capital letters the other without.
I tried changing the properties names and no capital letters at all.
Dim myData = lst.Select(Function(o) New With {.prop1 = o.fff, .prop2 = o.hhh})
Thanks.