On 2013-01-25 01:12, Andrei Alexandrescu wrote:

public Action temp { get; set; }
public Action Event { get { return temp; } }
t.Event; //returns the delegate
t.Event(); //calls the delegate.

Simple, clean, clear, concise. No problems with optional parens.

(Action is a delegate in C#)

This looks essentially the same as Walter's proposal.

This code contains explicit properties. Walter's proposal was to remove the explicit properties.

--
/Jacob Carlborg

Reply via email to