Benjamin Thaut:

I don't think that this is possible at all.

I see.


Do you think this is usefull?

In a program I define a null delegate, then later I assign to it one of different functions according to some run time values, and later I call the delegate several times. In such situation a delegate is handy to shorten my code, where max performance is not needed.

I generally use contract programming, because I've seen it catches some of my coding mistakes. So what's wrong in desiring to add a pre-condition to that delegate? (Currently I have put the pre-condition asserts inside the function assigned to the delegate).

Bye,
bearophile

Reply via email to