[Mono-dev] StackOverflow on System.Delegate.Equals

nekresh nekresh at gmail.com
Mon Apr 4 16:41:06 EDT 2011


On Mon, Apr 4, 2011 at 10:37 PM,  <kralu at poczta.onet.pl> wrote:
> On Mon, 2011-04-04 22:03:47 Gonzalo Paniagua Javier <gonzalo.mono at gmail.com> wrote:
>> On Mon, 2011-04-04 at 20:48 +0100, Alan wrote:
>> > Aren't event handler methods emitted with a [synchronized] attribute
>> > by default which would prevent this issue? You can check by
>> > disassembling the IL and seeing if its there.
>>
>> They are synchronized as long as you don't replace the default
>> add/remove with your own code.
>
> AFAIK you cannot inherit from the Delegate/MulticastDelegate class. So how can I replace the default add/remove code? Anyway I'm almost sure that case has no place in my code but I have to take a look on 3rd part libraries.  Thanks in advance for any help.
>
> Best regards,
> Marcin

public event MyType MyEvent {
  add { }
  remove { }
}


More information about the Mono-devel-list mailing list