The Action<T>
delegate return void. Is there any other built-in delegate which returns non void value?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Yes.
Func<>
returns the type specified as the final generic type parameter, such thatFunc<int>
returns anint
andFunc<int, string>
accepts an integer and returns a string. Examples:Sure, the Func Delegates return T.
All the way down to
http://msdn.microsoft.com/en-us/library/bb534960.aspx
http://msdn.microsoft.com/en-us/library/bb534303.aspx
Also, for the sake of completeness, there is Predicate which returns bool.
http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx