Skip to content
Discussion options

You must be logged in to vote

yes. Jint convert C# event to add_NameEvent for subscribe and remove_NameEvent for unsubscribe
example:
C#

public class Test()
{
    public event Action SomeEvent;
}

in js

    function Handler(){
        Log("Some happend")
    }

    var testClass = new Test()
    testClass.add_SomeEvent(Handler)
    testClass.remove_SomeEvent(Handler)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nathan130200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #503 on January 20, 2022 18:55.