c# - Initialize runtime value-type array with specific value? -


is there way can initialize following runtime array trues without looping on using foreach?

here declaration:

bool[] foo = new bool[somevariable.count];

thanks!

bool[] foo = enumerable.repeat(true, somevariable.count)                        .toarray(); 

Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -