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


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


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:


Assignments in a static class constructor are implicitly locked.


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