A solution to circular references between C # projects, there is a picture of the truth
Inter-Program Call interface, C # prohibit mutual reference, Haihong software, 20160315
C # prohibits reference to each other, if the project "order" has a orderedit unit, to be in the project "invoicing" can not be directly referenced, so define this standard interface.
1: Define the standard interface in the public unit.
2: Reference the order and Invoicing unit in the main program.
3: The virtual method of overriding an interface in the main program, invoking the function of the "order" item
4: When the main program starts, create the invocation instance, write the variable to the public static variable
5: Invoicing items are called through public variables
Relatively simple to solve.
A solution to circular references between C # projects, there is a picture of the truth