从用户控件中调用方法 [英] calling a method from user control

查看:68
本文介绍了从用户控件中调用方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从用户控制代码中调用应用程序方法(代码)吗?

Can I call application method(code) from user control code?

推荐答案

只要该方法具有正确的访问权限,就应该可以调用该方法修饰符,您已经添加了对该dll的引用.
You should be able to call a method so long as the method has the right access modifier and you have added a reference to the dll.


是的,您可以通过用户控件调用调用方法.创建控件的实例并使用其方法.在用户控制中公开您的方法,以便您可以在需要时访问它
Yes u call call a method from user control. Create the instance of the control and use its method. Make your method public in user control, so that you can access as and when required


这篇关于从用户控件中调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆