MemoryOwner<T>.DangerousGetReference Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a reference to the first element within the current instance, with no bounds check.
public ref T DangerousGetReference ();
member this.DangerousGetReference : unit -> 'T
Public Function DangerousGetReference () As T
Returns
A reference to the first element within the current instance.
Exceptions
Thrown when the buffer in use has already been disposed.
Remarks
This method does not perform bounds checks on the underlying buffer, but does check whether the buffer itself has been disposed or not. This check should not be removed, and it's also the reason why the method to get a reference at a specified offset is not present.