代表和分配多个程序?怎么样? [英] Delegates and assigning multiple procedures? How?
本文介绍了代表和分配多个程序?怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在C#中,我知道你可以使用代表向代表们分配子和函数的多个地址
让它激活多个程序...
如何在VB中执行此操作?我只知道在VB.NET中为委托分配一个
单一方法。我想用它来
和C#一样...来发射多个事件。
提前谢谢!
In C# I know that you can use delegates to assing
multiple addresses of sub and functions to a delegate and
have it fire multiple procedures...
How do I do this in VB? I only know of assigning a
single method to a delegate in VB.NET. I want to use it
as in C#... to fire multiple events.
Thanks in advance!
推荐答案
你好,
Iced Crow < CH ******** @ aol.com> schrieb:
Hello,
"Iced Crow" <ch********@aol.com> schrieb:
在C#中,我知道你可以使用代理人为一个代表分配子地址和函数的多个地址,并让它启动多个程序...
我如何在VB中执行此操作?我只知道在VB.NET中为委托分配一个
单一方法。我想在C#中使用
来解雇多个事件。
In C# I know that you can use delegates to assing
multiple addresses of sub and functions to a delegate and
have it fire multiple procedures...
How do I do this in VB? I only know of assigning a
single method to a delegate in VB.NET. I want to use it
as in C#... to fire multiple events.
您确定阅读了本章的文档吗?
事件和代表(Visual Basic语言概念)
http://msdn.microsoft.com/library/en...nheritance.asp
-
Herfried K. Wagner
MVP·VB Classic,VB.NET
http://www.mvps.org/dotnet
这些示例仅显示如何添加单个方法代表...
我可以调用代理的哪种方法来添加多个方法?我是否需要
来创建一个委托数组或一组代表?接近我需要的唯一
是CreateDelegate但那要求一个
类型...
***通过Developersdex发送 http://www.developersdex.com ***
不要只是参加USENET ...获得奖励它!
Those examples only show how to add a single method to a delegate...
what method of a delegate can I call to add multiple methods? Do I have
to create an array of delegates or a collection of delegates? The only
thing close to what I need is "CreateDelegate" but that is asking for a
type...
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
我浏览了一下但找不到
的实例将多个方法应用于单个代表,只是如何
将一个方法添加到我已经知道的代表中
怎么办...
I glanced through it but could not find an instance of
applying multiple methods to a single delegate, only how
to add a single method to a delegate which i already know
how to do...
这篇关于代表和分配多个程序?怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文