System.Buffer Class

Manipulates arrays of primitive types.

See Also: Buffer Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public static class Buffer

Remarks

Buffer 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.

Buffer 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 Array class.

Buffer is applicable to the following primitive types: bool, char, sbyte, byte, short, ushort, int, uint, long, ulong, IntPtr, UIntPtr, float, and double.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0