While using the function below in another project (windows Form app) I'm able to process the code below with no problems but when I'm running to the windows device the array.CopyTo function is not usable and even not recognized anymore. (CS1501 No overload for method 'CopyTo' takes 2 arguments)
Is there any other way to get the correct byte or string to send over I2C to the pcf8574?
Code: Select all
bool[] BoolArray = new bool[] { true, false, false, true, true, false, true, true, };
BitArray arr = new BitArray(BoolArray);
byte[] data = new byte[1];
arr.CopyTo(data, 0);
string hex = BitConverter.ToString(data);