converting byte[] to byte
<p>Can someone explain the difference in C# between a 'byte' and 'byte[]'?  My confusion is why I can't assign a single byte element out of the byte[] array into a variable defined as type 'byte'. </p>

<p>For example, this works:</p>

<pre><code>byte binSize;
binSize = br.ReadByte();
</code></pre>

<p>But this does not:</p>

<pre><code>byte binSize1;
binSize1 = br.ReadBytes(1);
</code></pre>

<p>I've looked at the <a href="https://msdn.microsoft.com/en-us/library/system.io.binaryreader(v=vs.110).aspx" rel="nofollow noreferrer">Microsoft Binary Reader class</a> and I see that the first example returns a single byte and the second returns an array of bytes.  I get it.  But is there some easy way to convert the single byte read in by 'ReadBytes' and cast it so that it can be stored in a 'byte' variable?</p>

<p>This is a problem when I want to convert what I read into an integer.  Only the line with 'binSize' below will work, the line with 'binSize1' will not.</p>

<pre><code>txt.Text = BitConverter.ToInt16(binSize, 0).ToString(); 
txt.Text = BitConverter.ToInt16(binSize1, 0).ToString(); 
</code></pre>

<p>The error I get with the second line is 'Cannot convert type 'byte[]' to 'byte'</p>