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

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -