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
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:
Create a lock when publishing the System.Runtime.InteropServices.SafeBuffer.
Create a local variable, initialize the System.Runtime.InteropServices.SafeBuffer, and then assign the System.Runtime.InteropServices.SafeBuffer to the static variable, for example, by using the System.Threading.Interlocked.CompareExchange``1(``0@, ``0, ``0) method.
Assignments in a static class constructor are implicitly locked.