Skip to content

How to pass values as out from C# -> JS interop? #1178

Answered by lahma
nathan130200 asked this question in Q&A
Discussion options

You must be logged in to vote

out and ref share the the same problem, JS doesn't have such semantics that would map well. This get awfully complex with all the closures etc. So unfortunately you need to add helpers, like extension method GetValueOrDefault (which I think is also part of latest NETversions), Jint does support registering extension methods too!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nathan130200
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants