JSTypedArray<T> constructor (1 of 5)
Creates a new typed array of specified length, with newly allocated memory.
C#
public JSTypedArray(int length)
See Also
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi
JSTypedArray<T> constructor (2 of 5)
Creates a typed-array over memory, without copying.
C#
public JSTypedArray(Memory<T> data)
See Also
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi
JSTypedArray<T> constructor (3 of 5)
Creates a typed-array over read-memory, without copying. Only valid for memory which was previously marshalled from a JS typed-array to .NET.
C#
public JSTypedArray(ReadOnlyMemory<T> data)
Exceptions
exception | condition |
---|---|
NotSupportedException | The memory is external to JS. |
See Also
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi
JSTypedArray<T> constructor (4 of 5)
Creates a typed-array over an array, without copying.
C#
public JSTypedArray(T[] data)
See Also
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi
JSTypedArray<T> constructor (5 of 5)
Creates a typed-array over an array, without copying.
C#
public JSTypedArray(T[] data, int start, int length)
See Also
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi