views:

288

answers:

3

Can someone tell me what the code equivelant in VB.Net to this C# code is?

new {name="value"}
A: 

That feature is called an anonymous type.

Pervez Choudhury
No, it's an object initializer if you specify the type as well. This is an anonymous type.
Jon Skeet
+3  A: 

This is called Anonymous Types and the VB equivalent is :

 New With {.Name = "value"}
BFree
To be 100% equivalent with C# anonymous types key should add the "Key" keyword before .Name.
JaredPar
A: 

Thanks a TON.

Tom Anderson