You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.6 KiB
33 lines
1.6 KiB
#if NET20
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace System
|
|
{
|
|
|
|
/// <summary>封装一个方法,该方法不具有参数,且返回由 TResult 参数指定的类型的值。</summary>
|
|
/// <typeparam name="TResult">此委托封装的方法的返回值类型。</typeparam>
|
|
/// <returns>此委托封装的方法的返回值。</returns>
|
|
public delegate TResult Func<out TResult>();
|
|
|
|
/// <summary>封装一个方法,该方法具有一个参数,且返回由 TResult 参数指定的类型的值。</summary>
|
|
/// <typeparam name="T">此委托封装的方法的参数类型。</typeparam>
|
|
/// <typeparam name="TResult">此委托封装的方法的返回值类型。</typeparam>
|
|
/// <param name="arg">此委托封装的方法的参数。</param>
|
|
/// <returns>此委托封装的方法的返回值。</returns>
|
|
public delegate TResult Func<in T, out TResult>(T arg);
|
|
|
|
/// <summary>封装一个方法,该方法具有两个参数,并返回由 TResult 参数指定的类型的值。</summary>
|
|
/// <typeparam name="T1">此委托封装的方法的第一个参数的类型。</typeparam>
|
|
/// <typeparam name="T2">此委托封装的方法的第二个参数的类型。</typeparam>
|
|
/// <typeparam name="TResult">此委托封装的方法的返回值类型。</typeparam>
|
|
/// <param name="arg1">此委托封装的方法的第一个参数。</param>
|
|
/// <param name="arg2">此委托封装的方法的第二个参数。</param>
|
|
/// <returns>此委托封装的方法的返回值。</returns>
|
|
public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2);
|
|
|
|
}
|
|
|
|
#endif
|
|
|