On Friday, 19 February 2021 at 08:04:19 UTC, Виталий Фадеев wrote:[...]files = new File[]( 1000 ); files[] = new File(); // add thisSince classes are reference types all instances of files will be the same reference of "new File()", which you probably don't want.
You can do files[].each!((ref a) => a = new File);