Feature request: Initialized array of objects


(Theo) #1

The following syntax (current):

var MyArray: Array [0…4] of Object := [new Object, New Object, New Object, New Object, New Object];

This creates an array wit initialized objects.

The new syntax request:

var MyArray: Array [0…4] of New Object;


(Carlo Kok) #2

Why not something like:

var MyArray: array of Object := Enumerable.Range(0, 5).Select(a -> new Object).ToArray;

(Theo) #3

Nice one.