Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の問題は、次のように外部デバイスのバイト配列に送信することです。 byte[] dataBuffer = new Byte[9] {1, 2, 3, 4, 5, 6, 7, 8, 9}; しかし、これらのバイトを読み取ると、たとえば 3 があるはずのときに 2 になります。したがって、常に左の値になります。配列の先頭に何か他のものがある可能性はありますか? ヌル値?
byte[] dataBuffer = new Byte[9] {1, 2, 3, 4, 5, 6, 7, 8, 9};
バイト配列はzero-indexed、dataBuffer [1]を最初の要素と見なしているかもしれませんが、実際にはdataBuffer[0]の最初の要素があります。
zero-indexed