简体   繁体   English

调用库的VS2010参考应用程序

[英]VS2010 Reference application that called library

I'm writing an application that references an in house library, and I need to make a method call from the library, back into the application. 我正在编写一个引用内部库的应用程序,并且需要从库中进行方法调用,然后再返回到应用程序中。 I cannot "Add A Reference" because this would end in circular dependencies. 我无法“添加引用”,因为这将以循环依赖关系结尾。 How, therefore, do I reference this method from the library? 因此,如何从库中引用此方法?

This is a very common scenario in .NET programming. 这是.NET编程中非常常见的情况。 For example, a button control has no clue what code should run when a user clicks it. 例如,按钮控件不知道用户单击按钮时应运行什么代码。

Use a delegate or event. 使用委托或事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM