How can I modify my method to check only indexes that are equal zero while modulo 17? I would like to get from that indexes all items that are equal also zero.
My List<byte[]> listOfArrays
is storing arrays with values 0,1
This is my method:
public List<int> Funct(List<byte[]> listOfArrays)
{
List<int> pixelsList = new List<int>();
foreach (byte[] t in listOfArrays)
{
//count how many items with value 0
var pixelsInArray = t.Count(n => n == 0);
var firstElement = Array.FindIndex(t, i => i == 0);
var lastElement = Array.FindLastIndex(t, i => i == 0);
pixelsList.Add(pixelsInArray);
}
return pixelsList;
}
In that method I search in all indexes.
I would appreciate your help.
PS. Please check my grammar if need to correct.