title: convert system.data.linq.binary to byte[]
body: <p>I am storing bytes in a database table. When I retrieve it with Linq 2 sql I get the return type in <code>system.data.linq.Binary</code>.</p>
  
  <p>I am not able to convert the <code>system.data.linq.binary</code> to byte array(<code>byte[]</code>).</p>
  
  <p>How do I convert it?</p>
  
  <pre><code>///my datacontext
  
  var db = new db();
  
  //key is an value from user
  
  var img = from i in db.images
            where i.id == key
            select i.data; 
  </code></pre>
  
  <p>the <code>i.data</code> is in <code>linq.binary</code> I want it to be in <code>byte[]</code>.</p>
  
  <p>I tried with <code>(byte[])img</code> but it did not work.</p>