How do I delete empty bytes from a List<byte>?
For example I got a list with a size of [5].
[0] = 5
[1] = 3
[2] = 0
[3] = 0
[4] = 17
At this example I want to delete byte with index: 2 and 3.
The Items in the list change every second. So the next time the list could be filled with something like:
[0] = 0
[1] = 2
[2] = 3
[3] = 4
[4] = 0
It's something like
myList.RemoveAll(b => b == 0);
bytes.RemoveAll(x => x == 0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With