title: C# - Convert unsafe byte* to byte[]
body: <p>I have an <code>unsafe</code> <code>byte*</code> pointing to a native byte array of known length. How can I convert it to <code>byte[]</code>? </p>
  
  <p>An <code>unsafe</code> <code>sbyte*</code> pointing to a zero-terminated native string can be converted to a C# <code>string</code> easily, because there is a <a href="http://msdn.microsoft.com/en-us/library/k9s9t975.aspx">conversion constructor</a> for this purpose, but I can't find a simple way to convert <code>byte*</code> to <code>byte[]</code>.</p>