mscorlib 4.0.0.0 Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid

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

Create a lock when publishing the .

Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method.

Assignments in a static class constructor are implicitly locked.

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.

- Constructor
  4.0.0.0
  To be added.

  Creates a new instance of the class, and specifies whether the buffer handle is to be reliably released.

  true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void `` To be added. To be added. To be added.
- Property
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 To be added. To be added.

  Gets the size of the buffer, in bytes.

- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` To be added.

  Defines the allocation size of the memory region in bytes. You must call this method before you use the instance.

  The number of bytes in the buffer.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` ``

  This method defines the required size of the memory region as the number of elements in an array multiplied by the size of each element.

  Specifies the allocation size of the memory buffer by using the specified number of elements and element size. You must call this method before you use the instance.

  The number of elements in the buffer. The size of each element in the buffer.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Void DefaultConstructorConstraint NotNullableValueTypeConstraint System.ValueType `` To be added.

  Defines the allocation size of the memory region by specifying the number of value types. You must call this method before you use the instance.

  The number of elements of the value type to allocate memory for. The value type to allocate memory for.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  T DefaultConstructorConstraint NotNullableValueTypeConstraint System.ValueType `` To be added.

  Reads a value type from memory at the specified offset.

  The value type that was read from memory.

  The location from which to read the value type. You may have to consider alignment issues. The value type to read.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void DefaultConstructorConstraint NotNullableValueTypeConstraint System.ValueType `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void

  After this method returns, the pointer cannot be used.

  Releases a pointer that was obtained by the method.

- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void DefaultConstructorConstraint NotNullableValueTypeConstraint System.ValueType `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void DefaultConstructorConstraint NotNullableValueTypeConstraint System.ValueType `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.