How to pass a byte[] to this function
<p>I have a function with this signature:</p>

<pre><code>void insert(T[] thearray);
</code></pre>

<p>And I have a byte array like this:</p>

<pre><code>byte[] value = new byte[4096];
</code></pre>

<p>But if I call function like this:</p>

<p>cb.insert(value);</p>

<p>I get a error:</p>

<pre><code>The method insert(Byte) in the type CircularBuffer&lt;Byte&gt; is not applicable for the arguments (byte[])
</code></pre>

<p>CircularBuffer is the class with the insert method.</p>

<p>I instantiate CircularBuffer like this:</p>

<pre><code>CircularBuffer&lt;Byte&gt; cb = new CircularBuffer&lt;Byte&gt;(4096);
</code></pre>

<p>How can I pass the value to this insert function?</p>

<p>To be clear, the CircularBuffer class is declared like this:</p>

<pre><code>public class CircularBuffer&lt;T&gt;

public CircularBuffer(int size) //ctor
</code></pre>

<p>More details if you need:</p>

<p><a href="http://codereview.stackexchange.com/questions/22826/circular-buffer-implementation-for-buffering-tcp-socket-messages">http://codereview.stackexchange.com/questions/22826/circular-buffer-implementation-for-buffering-tcp-socket-messages</a></p>

<p>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.</p>
