class ByteArray

Summary

This class represents a byte array managed by the Max Environment.

syntax:
public class ByteArray : Array<byte>

Constructors

ByteArray(IntPtr Pointer, ulong Count, ulong Alignment)

Instantiates an array of bytes with a given pointer, element count and alignment.

syntax:
public ByteArray(IntPtr Pointer, ulong Count, ulong Alignment) : base(Pointer, Count, Alignment)

Parameters

Type Name Description
IntPtr Pointer Array pointer
ulong Count Number of elements
ulong Alignment Alignment

ByteArray(ulong Count)

Instantiates an array of bytes with a certain number of elements.

syntax:
public ByteArray(ulong Count) : base(Count)

Parameters

Type Name Description
ulong Count Number of elements

ByteArray(byte[] Elements)

Instantiates an array of bytes with an array.

syntax:
public ByteArray(byte[] Elements) : base(Elements)

Parameters

Type Name Description
byte[] Elements Elements

Methods

CopyFromLength(byte[] Array, int Length)

Copies a source array to this one, of a certain length of elements.

syntax:
protected override void CopyFromLength(byte[] Array, int Length)

Parameters

Type Name Description
byte[] Array Source
int Length Length

InstanceCreate(ulong Length)

Creates an instance of ByteArray of a specified length.

syntax:
public override IDataType InstanceCreate(ulong Length)

Parameters

Type Name Description
ulong Length Length

Returns: Instance ( override IDataType )

Operators

ByteArray

Implicitly converts a byte array to an instance of ByteArray.

syntax:
public static implicit operator ByteArray(byte[] Value) => new ByteArray(Value);