mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Runtime.InteropServices.ComVisible(true)

only affects arrays of primitive types; this class does not apply to objects. Each primitive type is treated as a series of bytes without regard to any behavior or limitation associated with the primitive type.

provides methods to copy bytes from one array of primitive types to another array of primitive types, get a byte from an array, set a byte in an array, and obtain the length of an array. This class provides better performance for manipulating primitive types than similar methods in the class.

is applicable to the following primitive types: , , , , , , , , , , , , , and .

Manipulates arrays of primitive types.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` ``

  This method copies bytes from , beginning at , to , beginning at . Both and are zero-based; that is, the first byte in each buffer is at position 0, not position 1.

  The method accesses the bytes in the parameter array using offsets into memory, not programming constructs such as indexes or upper and lower array bounds. For example, if in the programming language of your application you declare an array with a zero-based lower bound of -50, and then pass the array and an offset of 5 to the method, the first array element the method will access is the second element of the array, which is at index -49. Furthermore, which byte of array element -49 is accessed first depends on the endianness of the computer that is executing your application.

  As its name suggests, the method copies a block of bytes as a whole, rather than copying one byte at a time. Therefore, if and reference the same array, and the range from + -1 overlaps the range from + - 1, the values of the overlapping bytes are not overwritten before they are copied to the destination. In the following example, the values of bytes 0-16 in an array named arr are copied to bytes 12-28. Despite the overlapping range, the values of the source bytes are successfully copied.

  code reference: System.Buffer.BlockCopy#3

  In the following example, the values of bytes 12-28 in an array named arr are copied to bytes 0-16. Again, despite the overlapping range, the values of the source bytes are successfully copied.

  code reference: System.Buffer.BlockCopy#4

  Copies a specified number of bytes from a source array starting at a particular offset to a destination array starting at a particular offset.

  The source buffer. The zero-based byte offset into . The destination buffer. The zero-based byte offset into . The number of bytes to copy.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  Returns the number of bytes in the specified array.

  The number of bytes in the array.

  An array.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Byte `` ``

  The GetByte method gets a particular byte out of the array. The array must be an array of primitives.

  Retrieves the byte at a specified location in a specified array.

  Returns the byte in the array.

  An array. A location in the array.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  must be an array of primitives.

  Assigns a specified value to a byte at a particular location in a specified array.

  An array. A location in the array. A value to assign.