I have a function with this signature:
void insert(T[] thearray);
And I have a byte array like this:
byte[] value = new byte[4096];
But if I call function like this:
cb.insert(value);
I get a error:
The method insert(Byte) in the type CircularBuffer<Byte> is not applicable for the arguments (byte[])
CircularBuffer is the class with the insert method.
I instantiate CircularBuffer like this:
CircularBuffer<Byte> cb = new CircularBuffer<Byte>(4096);
How can I pass the value to this insert function?
To be clear, the CircularBuffer class is declared like this:
public class CircularBuffer<T>
public CircularBuffer(int size) //ctor
More details if you need:
EDIT in the end I decided for efficiency reasons to create a specialised ByteCircularBuffer. - using byte. This area of primitive type to object type, eg byte -> Byte is confusing.