I am trying to convert a C # block to vb.
I used the service on developerfusion.com to convert, but when I paste it into Visual Studio, it agrees with the "Key" operations ("The field name or property initialized in the object initializer must begin with '.'").
I played with the code for several hours trying to get around this, but everything I did led to big mistakes.
So, I began to wonder if the conversion was right in developerfusion.
Here is C # for vb.net.
I'm not sure where the Key comes from, and wondered if anyone could enlighten me.
Thanks!
FROM
var combinedResults = cars.Select(c=>new carTruckCombo{ID=c.ID,make=c.make,model=c.model}) .Union(tracks.Select(t=>new carTruckCombo{ID=t.ID,make=t.make,model=t.model}));
For
Dim combinedResults = cars.[Select](Function(c) New carTruckCombo() With { _ Key .ID = c.ID, _ Key .make = c.make, _ Key .model = c.model _ }).Union(tracks.[Select](Function(t) New carTruckCombo() With { _ Key .ID = t.ID, _ Key .make = t.make, _ Key .model = t.model _ }))
source share