Use byte[] in JS #1583
Unanswered
KhanhGia-HaUI
asked this question in
Q&A
Replies: 1 comment
-
using Jint;
Engine engine = new();
engine.SetValue("writeBytes", (byte[] bytes) =>
{
Console.WriteLine(bytes[0]); // output 1, expected 1
Console.WriteLine(bytes[1]); // output 2, expected 2
Console.WriteLine(bytes.Length); // output 2, expected 2
return bytes;
});
engine.Execute("writeBytes([0x01, 0x02])"); seems to be no problem i think😮 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a function in JS like this, and adapt through the engine:
In JS, I tried to call it like this but it doesn't work, can you help me check it, thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions