Many times I need to loop over all the items of an array. If it was List I would have used ForEach extension method.
Do we have anything similar for arrays as well.
For. e.g. lets say I want to declare an array of bool of size 128 & initialize all members to true.
bool[] buffer = new bool [128];
There can be many more use cases
Now initialize it to true. is there any extension method or do I need to write traditional foreach loop??