Event handling in C # assembly

I have an executable project called A.EXE that references the C # class library B.DLL.

A.EXE generates events that are processed by the class in B.DLL. Events use their own eventArgs child, called ProjectEventArgs.

Do I need to add a reference to A.EXE in the B.DLL project to define the ProjectEventArgs class? This does not seem to me completely correct, since I believe that it is a circular dependence.

Is there a way to reorganize my code to avoid this?

thanks Andy

+1
source share
2 answers

a.exe b.dll , , . DLL, , , .

, , ProjectEventArgs dll . - , ProjectEventArgs - A.exe ? ( , dll).

, A, ProjectEventArgs () . (, EventArgs - , EventArgs B?)

ProjectEventArgs , / , .

+2

B.DLL A.EXE - , .

, , , B.DLL , A, B. , ProjectEventArgs A.

, .

+4

All Articles