using System.Linq; namespace DataBlockHelper.Entity.DB2105Entity { public class FourBoolArrayManager { private int StartSet; private byte[] Bytes; public FourBoolArrayManager(int startSet, byte[] bytes) { StartSet = startSet; Bytes = bytes; } public bool[] GetList() { bool[] ListE = new bool[4]; //var getListE = PlcConnect.Instance.Read("DB2105." + StartSet + ".0", 1); var content = Bytes.Skip(StartSet).Take(1).ToArray(); byte byt = content[0]; ListE[0] = byt.GetBit(0); ListE[1] = byt.GetBit(1); ListE[2] = byt.GetBit(2); ListE[3] = byt.GetBit(3); return ListE;; } } }