title: MemoryStream instead of byte[] for files added as resources?
body: <p>I have a .NET assembly to which i've added a number of files as resources (binary, >500KB each). I have previously been accessing these using the <code>ResourceManager.GetObject()</code> method on the auto-generated <code>Resources</code> class, which returns a <code>byte[]</code>.</p>
  
  <p>For performance and syntax reasons, I would rather operate on these binary resources as streams instead of byte-arrays. I've found that, by manually editing the .resx file and changing the name of the class in the <code>&lt;value&gt;</code> element from <code>System.Byte[]</code> to <code>System.IO.MemoryStream</code>, i'm able to use the <code>ResourceManager.GetStream()</code> method to successfully access the resources as streams, e.g.</p>
  
  <pre><code>&lt;data name="MyFile" type="System.Resources.ResXFileRef, System.Windows.Forms"&gt;
      &lt;value&gt;..\Resources\MyFile.ext;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/value&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>becomes:</p>
  
  <pre><code>&lt;data name="MyFile" type="System.Resources.ResXFileRef, System.Windows.Forms"&gt;
      &lt;value&gt;..\Resources\MyFile.ext;System.IO.MemoryStream, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/value&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>The only drawback to this approach is that Visual Studio always adds new file resources in the <code>byte[]</code> form. Is there a way that I can get it to set the type to <code>MemoryStream</code> for me?</p>