Complete the code to declare an Action delegate that takes no parameters.
Action [1] = () => Console.WriteLine("Hello World");
The variable name for the Action delegate should follow C# naming conventions, so PrintMessage is the best choice.
Complete the code to declare an Action delegate that takes one integer parameter and prints it.
Action<int> printNumber = [1] => Console.WriteLine([1]);
The parameter name num is used consistently in the lambda expression.
Fix the error in the Action delegate declaration that takes two string parameters and prints them.
Action<string, string> printNames = ([1], lastName) => Console.WriteLine($"First: { [1] }, Last: {lastName}");
The parameter firstName is used consistently in the lambda expression and the string interpolation.
Fill both blanks to create an Action delegate that takes a string and an int, then prints them formatted.
Action<string, int> printInfo = ([1], [2]) => Console.WriteLine($"Name: { [1] }, Age: { [2] }");
The parameter names name and age are used consistently in the lambda expression and the output string.
Fill all three blanks to create an Action delegate that takes three parameters and prints a formatted message.
Action<string, int, bool> printDetails = ([1], [2], [3]) => Console.WriteLine($"Name: { [1] }, Age: { [2] }, Active: { [3] }");
The parameter names userName, userAge, and isActive are used consistently in the lambda and output.