title: Convert int[] to byte[] type pointer in C#
body: <p>I require to convert int[] to byte[] pointer.
  The above is required in order to be able to populate the entries of a WriteableBitmap pixel by pixel as below:</p>
  
  <pre><code>//previewBuffer1 is of type byte[]
  WriteableBitmap wb1 = new WriteableBitmap(nVidWidth, nVidHeight);
  int k=0;
  // wb1.Pixels is of type int[] by default
  byte* data = (byte*) wb1.Pixels;  // ****THIS DOESN'T WORK. THROWS ERROR. HOW CAN I ACCOMPLISH THIS***
  for (int i=0; i&lt;nVidHeight; i++){
      for (int j=0; j&lt;nVidWidth; j++){
          byte grayscaleval = previewBuffer1[k];
          data [4*k] = grayscaleval ;
          data [4*k + 1] = grayscaleval ;
          data [4*k + 2] = grayscaleval ;
          k++;
      }
  }
  </code></pre>
  
  <p>How do I get a byte* pointer for wb1.Pixels which is of type int[]?</p>