On Sunday, 10 January 2016 at 14:32:02 UTC, Jack wrote:
...

Just to make your code a little more clear, try using aliases when defining delegate parameters. Like this:

alias Action = void delegate();

Then in your code you use the alias, like this:

class Bar()
{
    private Action _action;

    void setAction(Action d)
    {
        this._action = d;
    }
}

IMHO it makes everything more readable and you only have one definition of the delegate signature.

Reply via email to