What is the difference between using a delegate and using Func<T>/Action<T> in a method signature?
- 阅读更多 关于 What is the difference between using a delegate and using Func/Action in a method signature?
问题 I have been trying to get my head around delegates in C#, but I just don't seem to get the point of using them. Here is some slightly reconstructed code from the MSDN page on delegates: using System; using System.Collections; namespace Delegates { // Describes a book in the book list: public struct Book { public string Title; // Title of the book. public string Author; // Author of the book. public decimal Price; // Price of the book. public bool Paperback; // Is it paperback? public Book