System.Runtime.InteropServices.SafeBuffer Class

Provides a controlled memory buffer that can be used for reading and writing. Attempts to access memory outside the controlled buffer (underruns and overruns) raise exceptions.

See Also: SafeBuffer Members

Syntax

public abstract class SafeBuffer : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid

Remarks

You must call the erload:System.Runtime.InteropServices.SafeBuffer.Initialize method before you use any instance of System.Runtime.InteropServices.SafeBuffer. To avoid races when you store an instance of a System.Runtime.InteropServices.SafeBuffer object in a static variable, you should use one of the following approaches:

Note:

Assignments in a static class constructor are implicitly locked.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0