title: C# way to set a float buffer in memory
body: <p>I am an usual Java developer but now I'm trying to create some OpenGL stuff in C#.</p>
  
  <p>However, in Java I do it like this:</p>
  
  <pre><code>private FloatBuffer verticesBuffer;
  private float[] vertices = new float[]{... some vertices ...};
  
  ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);
  vbb.order(ByteOrder.nativeOrder());
  verticesBuffer = vbb.asFloatBuffer();
  verticesBuffer.put(vertices);
  verticesBuffer.position(0);
  </code></pre>
  
  <p>How should I become same thing in C#?</p>