Struct MemoryPointer.UnmanagedPointer
A pointer to a continuous region of unmanaged memory.
Inherited Members
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public struct MemoryPointer.UnmanagedPointer : MemoryPointer.IMemoryPointer, IDisposable
Constructors
UnmanagedPointer(void*, int)
Constructor.
Declaration
public UnmanagedPointer(void* pointer, int length)
Parameters
Type | Name | Description |
---|---|---|
void* | pointer | The pointer to a continuous region of unmanaged memory. |
int | length | The length of the unmanaged memory region. |
Properties
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
|
Length
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int | The length of the memory region. |
Span
Declaration
public Span<byte> Span { get; }
Property Value
Type | Description |
---|---|
Span<byte> | A span created from the current object. |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Reset(void*, int)
Sets with a new value.
Declaration
public void Reset(void* pointer, int length)
Parameters
Type | Name | Description |
---|---|---|
void* | pointer | |
int | length |
Slice(int)
Forms a slice out of the current memory that begins at a specified index.
Declaration
public MemoryPointer.UnmanagedPointer Slice(int start)
Parameters
Type | Name | Description |
---|---|---|
int | start | The index at which to begin the slice. |
Returns
Type | Description |
---|---|
MemoryPointer.UnmanagedPointer | An object that contains all elements of the current instance from |
ToString()
Returns the text representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | the text representation. |