Hi guys I need help how to convert my uint and int to 3 byte array. Converting it to 4 byte array is easy since .Net has BitConverter class but now I really need to convert it to 3 Byte Array hope someone can help me out. Thanks
powerbox
13
Light Poster
Recommended Answers
Jump to PostPerhaps you could change this struct, so that it fits your 3 byte scheme:
struct IntBits { private int _bits; public IntBits(int InitialBitValue) { _bits = InitialBitValue; } //declare indexer public bool this[int index] { get { return (_bits & (1 << index)) != 0; } set …
All 3 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
nick.crane
342
Veteran Poster
powerbox
13
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.