什么是C#中的Func <TResult>?

1 c# delegates

什么是Func<TResult>C#?

我用过Action<T>但不知道用法Func<TResult>

请提供良好实例的解释.

Fem*_*ref 7

Func<TResult>表示采用0参数并返回对象的方法TResult,而Action<T>表示返回void的方法.您需要两个不同的委托,因为您无法指定void为类型参数.