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

    1. <tfoot id='SfP4m'></tfoot>

        <bdo id='SfP4m'></bdo><ul id='SfP4m'></ul>
    2. <small id='SfP4m'></small><noframes id='SfP4m'>

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

      1. C# 中的标准委托

        Standard delegates in C#(C# 中的标准委托)

        <tfoot id='BeO8z'></tfoot>

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

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

                2. 本文介绍了C# 中的标准委托的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 C# 中预定义了一些委托

                  There are some Delegates predefined in C#

                  我知道这些:

                  EventHandler // Default event callbacks
                  EventHandler<T> // Default event callbacks with custom parameter (inheriting from EventArgs)
                  Action // Function without return value and without parameter
                  Action<T1, T2, T3, T4> // Function without return value and 1-4 parameters
                  Func<T1, T2, T3, T4, TResult> // Methos with 0-4 parameters and one result type
                  Predicate<T> // equivalent to Func<T, bool>
                  

                  对于特殊情况和框架的生成表单部分还有很多,但这些通常很适合用于自行编写的代码.

                  There are many more for special cases and generated form parts of the framework, but these are often good to use in self written code.

                  如果你知道一些更有用的添加它们.否则,这是回答.

                  If you know some more useful add them. Otherwise this is answered.

                  推荐答案

                  它们没有在 C# 中预定义.它们由框架定义.

                  They're not predefined in C#. They're defined by the framework.

                  ActionFunc 委托系列比您所展示的要宽 - 它们上升到

                  The Action and Func delegate families are wider than you've shown - they go up to

                  Action<T1, T2, T3, T4>
                  

                  Func<T1, T2, T3, T4, TResult>
                  

                  .NET 2.0 中另一个常见的列表操作(在 LINQ 之前)是 Predicate<T>.

                  Another common-ish one in .NET 2.0 for list manipulation (before LINQ) is Predicate<T>.

                  使用线程:

                  ThreadStart
                  ParameterizedThreadStart
                  WaitCallback
                  TimerCallback
                  AsyncCallback
                  

                  这篇关于C# 中的标准委托的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  Parameter count mismatch with Invoke?(参数计数与调用不匹配?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  How delegates work (in the background)?(代表如何工作(在后台)?)
                  C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)

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

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

                      1. <legend id='svanH'><style id='svanH'><dir id='svanH'><q id='svanH'></q></dir></style></legend>
                        <tfoot id='svanH'></tfoot>
                          <bdo id='svanH'></bdo><ul id='svanH'></ul>
                            <tbody id='svanH'></tbody>