Kizspy | Question: 36
(Choose 1 answer)
Which of the following code snippets demonstrates the use of a Func delegate?
A. Func<int, int, int> add (a, b) => a+b;
Console.WriteLine(add(5, 3));
B. Func<string> greet = () => "Hello";
Console.WriteLine(greet);
C. Func<int, string, string> concatenate = (a, b) => b+a;
Console.WriteLine(concatenate(3, "Number: "));
D. Func<int, string> output = (x) => x.ToString();