Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Javascript side create byte array

0
0
Hi ZoneRunner,

Here's a sample:
// using Microsoft.ClearScript.JavaScript;
engine.Execute("values = new Uint8Array([1, 2, 3, 4, 5])");
var values = (ITypedArray<byte>)engine.Script.values;
Console.WriteLine(string.Join(", ", values.ToArray()));
The ITypedArray interface also has methods for transferring array elements to and from existing .NET arrays.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images