日期:2014-05-16  浏览次数:20841 次

ASP.NET MVC4实现TinyMCE 4.0.20自定义上传功能

unc<T, TResult> Delegate?? 3.5以上版本可用.

个人理解:不用再事先声明一个delegate的类型了.可以直接用,也可以用lamba调用 .参数1:委托类型,参数二:返回类型

?

?

Eg1;传统型的.

using System;

delegate string ConvertMethod(string inString);

public class DelegateExample
{
??
public static void Main()
?? {
?????
// Instantiate delegate to reference UppercaseString method
?????
ConvertMethod convertMeth = UppercaseString;
?????
string name = "Dakota";
?????
// Use delegate instance to call UppercaseString method
????? Console.WriteLine(convertMeth(name));
?? }

private static string UppercaseString(string inputString)
?? {
?????
return inputString.ToUpper();
?? }
}

?

//个人理解:1.代理在用的时候要实例化,

2.被调用的方法必须是