Object and Array Initializers in VB 9

You can create a new object and initialize some of its properties in one shot. Most examples online are in C#, so here is an example in VB:

As for array initialization, it looks like this:

According to MSDN it says I can do it this way:

But that didn’t work for me and it gave the error: “Array initializers are valid only for arrays, but the type of ‘cars’ is ‘Object'” So I guess type inference doesn’t work with array initialization. This also doesn’t work with collections or array lists – ONLY arrays.