<i id='WoLTi'><tr id='WoLTi'><dt id='WoLTi'><q id='WoLTi'><span id='WoLTi'><b id='WoLTi'><form id='WoLTi'><ins id='WoLTi'></ins><ul id='WoLTi'></ul><sub id='WoLTi'></sub></form><legend id='WoLTi'></legend><bdo id='WoLTi'><pre id='WoLTi'><center id='WoLTi'></center></pre></bdo></b><th id='WoLTi'></th></span></q></dt></tr></i><div id='WoLTi'><tfoot id='WoLTi'></tfoot><dl id='WoLTi'><fieldset id='WoLTi'></fieldset></dl></div>
  • <tfoot id='WoLTi'></tfoot>

    <legend id='WoLTi'><style id='WoLTi'><dir id='WoLTi'><q id='WoLTi'></q></dir></style></legend>

    1. <small id='WoLTi'></small><noframes id='WoLTi'>

          <bdo id='WoLTi'></bdo><ul id='WoLTi'></ul>

        帮助理解 .NET 委托、事件和事件处理程序

        时间:2023-09-16
          <tbody id='XYRCy'></tbody>

        <small id='XYRCy'></small><noframes id='XYRCy'>

            <legend id='XYRCy'><style id='XYRCy'><dir id='XYRCy'><q id='XYRCy'></q></dir></style></legend>
              <bdo id='XYRCy'></bdo><ul id='XYRCy'></ul>
            • <i id='XYRCy'><tr id='XYRCy'><dt id='XYRCy'><q id='XYRCy'><span id='XYRCy'><b id='XYRCy'><form id='XYRCy'><ins id='XYRCy'></ins><ul id='XYRCy'></ul><sub id='XYRCy'></sub></form><legend id='XYRCy'></legend><bdo id='XYRCy'><pre id='XYRCy'><center id='XYRCy'></center></pre></bdo></b><th id='XYRCy'></th></span></q></dt></tr></i><div id='XYRCy'><tfoot id='XYRCy'></tfoot><dl id='XYRCy'><fieldset id='XYRCy'></fieldset></dl></div>

                <tfoot id='XYRCy'></tfoot>

                • 本文介绍了帮助理解 .NET 委托、事件和事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在过去的几天里,我问了几个关于代表的问题 这里和这里.我承认......我不太了解代表.我真的真的真的很想了解和掌握它们.(我可以定义它们——类型安全函数指针——但由于我对 C 类型语言的经验很少,所以它并没有真正的帮助.)

                  In the last couple of days I asked a couple of questions about delegates HERE and HERE. I confess...I don't really understand delegates. And I REALLY REALLY REALLY want to understand and master them. (I can define them--type safe function pointers--but since I have little experience with C type languages it is not really helpful.)

                  任何人都可以推荐一些在线资源,这些资源将以一种不假设的方式解释代表吗?

                  Can anyone recommend some online resource(s) that will explain delegates in a way that presumes nothing?

                  这是我怀疑 VB 实际上妨碍了我的那些时刻之一,因为它在幕后为我做了一些连接.

                  This is one of those moments where I suspect that VB actually handicaps me because it does some wiring for me behind the scenes.

                  理想的资源只是解释什么是委托,而不参考其他任何东西(事件和事件处理程序),将向我展示所有一切是如何连接起来的,解释(正如我刚刚了解到的)委托是类型以及是什么使它们独特的类型(也许使用一点 ildasm 魔法)).然后,该基础将扩展以解释委托如何与事件和事件处理程序相关联,这本身就需要一个很好的解释.最后,该资源可以使用真实示例将它们联系在一起,并解释编译器会自动发生什么接线,如何使用它们等.哦,是的,什么时候应该和不应该使用委托,换句话说,缺点和替代方案使用代表.

                  The ideal resource would just explain what delegates are, without reference to anything else like (events and eventhandlers), would show me how all everything is wired up, explain (as I just learned) that delegates are types and what makes them unique as a type (perhaps using a little ildasm magic)). That foundation would then expand to explain how delegates are related to events and eventhandlers which would need a pretty good explanation in there own right. Finally this resource could tie it all together using real examples and explain what wiring DOES happen automatically by the compiler, how to use them, etc. And, oh yeah, when you should and should not use delegates, in other words, downsides and alternatives to using delegates.

                  你说什么?你们中的任何人都可以向我指出可以帮助我开始精通之旅的资源吗?

                  What say ye? Can any of you point me to resource(s) that can help me begin my journey to mastery?

                  编辑最后一件事.理想的资源将解释如何在接口声明中使用和不能使用委托.这真的让我很受挫.

                  EDIT One last thing. The ideal resource will explain how you can and cannot use delegates in an interface declaration. That is something that really tripped me up.

                  感谢您的帮助.

                  赛斯

                  推荐答案

                  我会从这些开始:

                  http://www.yoda.arachsys.com/csharp/events.html

                  http://msdn.microsoft.com/en-us/library/ms173171.aspx

                  这篇关于帮助理解 .NET 委托、事件和事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在什么情况下脱离事件是必要的? 下一篇:在控件外部单击时如何关闭 Silverlight 中的弹出窗口?

                  相关文章

                  <small id='DbPH7'></small><noframes id='DbPH7'>

                  1. <tfoot id='DbPH7'></tfoot>
                    <legend id='DbPH7'><style id='DbPH7'><dir id='DbPH7'><q id='DbPH7'></q></dir></style></legend>
                    <i id='DbPH7'><tr id='DbPH7'><dt id='DbPH7'><q id='DbPH7'><span id='DbPH7'><b id='DbPH7'><form id='DbPH7'><ins id='DbPH7'></ins><ul id='DbPH7'></ul><sub id='DbPH7'></sub></form><legend id='DbPH7'></legend><bdo id='DbPH7'><pre id='DbPH7'><center id='DbPH7'></center></pre></bdo></b><th id='DbPH7'></th></span></q></dt></tr></i><div id='DbPH7'><tfoot id='DbPH7'></tfoot><dl id='DbPH7'><fieldset id='DbPH7'></fieldset></dl></div>
                        <bdo id='DbPH7'></bdo><ul id='DbPH7'></ul>