System.IO.UnmanagedMemoryStream.Initialize Method

Initializes a new instance of the System.IO.UnmanagedMemoryStream class by using a pointer to an unmanaged memory location.

Syntax

[System.CLSCompliant(false)]
protected void Initialize (byte* pointer, long length, long capacity, FileAccess access)

Parameters

pointer
A pointer to an unmanaged memory location.
length
The length of the memory to use.
capacity
The total amount of memory assigned to the stream.
access
One of the System.IO.FileAccess values.

Remarks

This method is equivalent to the UnmanagedMemoryStream.#ctor(Byte*, long, long, FileAccess) constructor. It supports methods that need to initialize the pointer before setting stream variables and, therefore, cannot call the parameterized constructor. Such methods should use the default constructor, UnmanagedMemoryStream.#ctor, initialize the pointer, and then invoke the UnmanagedMemoryStream.Initialize(Byte*, long, long, FileAccess) method.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0