Array element to struct constrained method
<p>I need to pass value from array to method that has where T : struct generic constraint.</p>

<p>I have <code>object[] values;</code> That for example contains <code>{ (int)7, (byte)3, (char)'a' }</code> (i don't know structure at compile time)</p>

<p>and i need to pass that array, or all elements one by one to any of following methods</p>

<pre><code>DataStream(Array array)
DataStream(IntPtr ptrToArray, int sizeInbytes)

DataStream.Write&lt;T&gt;(T value) where T : struct
DataStream.WriteBytes(byte[] bytes)
</code></pre>

<p>First method will write some error in GCHandle.Alloc (that object does not contain primitive data)
Third mthod will not compile since object is not struct</p>

<p><em>Actual problem is that i am trying to create MeshBuilder in SlimDX that will contain VertexChannels and then build VertexBuffer out of them</em></p>
