What is the difference between Func<string,string> and delegate ?
What is the difference between Func<string,string> and delegate ?
The main differences between Func<string,string> and a custom delegate are:
Func<string,string> is a built-in generic delegate in C# that represents a method with a string parameter and a string return type. It's defined as public delegate TResult Func<in T, out TResult>(T arg);delegate keyword, e.g. public delegate string StringTransformer(string input);Func<string,string> is limited to methods with a string parameter and string return type. Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.