rEaL-jAsE
12/11/2021 - 7:07 AM

lock salt main events sample

this sample demonstrates creating your own event handlers and how to use them.
App ->
{
    [String] name: "Jason";

    GreetUser();

    scope EventDeclarations
    {
        [Event] Greeted;
    }

    void GreetUser()
    {
        Console.WriteLine("Hello, " + name + ".");
        Greeted();
    }

    scope Events
    {
        void Greeted()
        {
            comment: Wait for the user to exit manually.
            Console.WaitForExitKey();
        }
    }
}