i want to convert array of short to array of bytes in order to send it in Datagram Packet and then convert it from bytes to short
Jump to Post
Obviously you can use bitwize operations to separate out the two bytes of each short and store them into consecutive elements of a byte array (and vice-versa), but does anyone know a smarter solution?
All 7 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.