int[] arr1 = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
How can I run through this array and check each int in the array against a number(Lets say 5) and if the array int number is less than 5 then set that int to 0 and if the array int number is greater than 5 set the array int number to 1.
I'm transferring RGB values to a PLC for processing. I would like to have the PC process the RGB data and just sent an array of 1,s and 0,s to the PLC. Here's what I have so far:
Array.Copy(Reddepthcall, RedmatchedItemsAngle, 1000);
RedmatchedItemsAngleFinal = Array.FindAll(
RedmatchedItemsAngle,
x => x >= lBound && x <= uBound
);
for (int ctr = 0; ctr < RedmatchedItemsAngleFinal.Length; ctr++) ;
int RedcountAngle = RedmatchedItemsAngleFinal.Length;