[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

How to register a event handler in a different application domain?

Dave

1/23/2006 7:07:00 PM

Hi,

I am programming in C#.
1). In application domain A, I have a class myClass1 in project1 and create
an event myEvent.
2). In application domain B, I have a class myClass2 in project2 and obtain
the reference of myClass1 as mc1. I want to register myEventFoo() in myClass2
as eventhandler for myEvent.
3). I use "mc1.myEventEventHandler+= new myEventEventHandler(myEventFoo);"
to register myEventFoo() in myClass2 to myEvent in myClass1.

The compiling failed with "error binding to target method" message.

I wonder what is wrong with this and how can I do my work?

Your advise is highly appreciated.

Thanks

Dave