Skip to content

NativeBytes

Namespace Mc.Scripting · Kind struct (readonly, ref)

public readonly ref struct NativeBytes

Borrowed byte buffer (McBytes). Only valid during the dispatch that provided it.

Member Description
NativeBytes(byte* data, long size) Wraps native memory.
public NativeBytes(byte* data, long size)

Wraps native memory.

Parameters

Name Type Description
data byte*
size long
Member Description
int Length { get; } Length in bytes.
ReadOnlySpan<byte> Span { get; } The bytes (borrowed).
public int Length { get; }

Length in bytes.

public ReadOnlySpan<byte> Span { get; }

The bytes (borrowed).

Member Description
byte[] ToArray() Copies the bytes.
public byte[] ToArray()

Copies the bytes.

Returns byte[]