You can use + operator to add function reference only in sequence.
In case, if I need to add a function reference in between and
programmatically, is that still possible?
IMHO, if you feel a need for your delegates to be combined and thus
invoked in a particular order, a multicast delegate is probably the wrong
solution. It is probably better to implement your own ordered list of
delegates that manages that explicitly.
That said, it certainly can be done with only a delegate as the data
structure, if you are willing to write some extra code. The first step
would be to have some way of representing exactly where in the invocation
sequence you want the newly added delegate to appear. Then you would have
to enumerate the delegate's invocation list, adding each one in sequence
to a new delegate instance (or adding it to a plain List<Delegate>, which
you then later convert to an array that is passed to the
Delegate.Combine() overload that takes an array of delegate instances),
inserting the new delegate at the appropriate point.
Pete