Setting every element in an array to a given value
You can also use the static Array.Fill to quickly initialize an array to a given value:

bool[] isPrime = new bool[500];
Array.Fill(isPrime, true);


This will set all items in the array to true.

As mentioned in the comments by Pieter Witvoet, this feature is available in .NET Core only.