> > As I said in an earlier message, would you care to propose a syntax for this
> > feature that will handle overloaded methods?
> 
>       Well - on further reflection, I don't see why (particularly) there
> should be any real problem with overloaded methods - it could be
> possible for a delegate to map to a set of methods, until Invoke time -
> surely ?

A delegate can only map to a single method, with a precise signature,
not a set of methods.

>       ? you need the type information anyway to marshal the arguments
> generically, and the 'Delegate' encodes that anyhow - surely ?

Creating a delegate, like this:

        delegate int Greet (string name);

Results in the compiler generating something like this:

        class Greet : MulticastDelegate {
                object instance;

                int Invoke (string name);
                ...
        }

It is just sintactic sugar for a common construct.

Invocations on delegates:

        Greet g = get_greeting ();
        g ("hey");

Become:

        Greet g = get_greeting ();
        g.Invoke ("hey");

Miguel

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to