What's the equivalent VB.NET syntax for anonymous types in a LINQ statement?

new { ... } becomes

New With { ... } in VB.NET,

or

New With {Key ... } if you want to use Key properties (which allows you to compare two anonymous type instances but does not allow the values of those properties to be changed).

So I'm guessing your statement would look like:

.Select(Function(ci) New With {Key _
    .CartItem = ci, _
    .Discount = DiscountItems.FirstOrDefault(Function(di) di.SKU = ci.SKU) _
})

C#:

new {name1 = "value1", name2 = "value2"}

VB equivalent:

New With {Key .name1 = "value1", Key .name2 = "value2"}

Also,

C#:

new {anotherObj.prop1, anotherObj.prop2}

VB equivalent:

New With {Key anotherObj.prop1, Key anotherObj.prop2}

Note: The Key keyword in VB equivalents is necessary. When you specify the Key in VB, the property becomes read-only and is checked in Equal method AND in C# all properties of anonymous types are read-only and are checked in Equal method.

See:

Anonymous Types (C# Programming Guide)

Anonymous Types (Visual Basic)