   [SlimDX] problem to put array in my vertex buffer
  Hi.I try to understand the vertex buffer and I use "MiniTri" example for helping me.This works with this:Dim v1 As New Vertex(New Vector3(0, 1, 0), New Vector3(0,0,1), Color.Blue.ToArgb)Dim v2 As New Vertex(New Vector3(-1, 0, 0), New Vector3(0,0,0),Color.Blue.ToArgb)Dim v3 As New Vertex(New Vector3(1, 0, 0), New Vector3(0,0,1),Color.Blue.ToArgb)Dim tempMeshArray(3) As VertextempMeshArray(0) = v1tempMeshArray(1) = v2tempMeshArray(2) = v3VBuffer = New VertexBuffer(crDevice, 3 * Marshal.SizeOf(GetType(Vertex)),VBufferUsage, VBufferVertexFormat, Pool.Managed)VBuffer.Lock(0, 0, LockFlags.None).WriteRange(New Vertex() {v1, v2, v3})But if I want to put directly the array in the method "Lock" like this:VBuffer.Lock(0, 0, LockFlags.None).WriteRange(tempMeshArray)I have an "EndOfStreamException" (translated from french ... sorry):"Attempt at reading beyond the end of flow."I don't understand where is the error !I'm planning making a function who write the vertex himself because I don't know in advance how many vertex I will have in my array. So, I'm blocked !I don't want harcoding my vertices !How can I do ?Thanks in advance for help me to understand my error.   
  tryVBuffer = New VertexBuffer(crDevice, 3 * Marshal.SizeOf(GetType(Vertex)) * tempMeshArray.Length,VBufferUsage, VBufferVertexFormat, Pool.Managed)I am not very experience in SlimDX so idk if it will work, but give it a try.   