Example of Lambda Expression with Action method with String as Parameter in C#

Below is a sample code snippet that demonstrates the lambda expression with action method with string as parameter in C#.

Example of Lambda Expression with Action method with String as Parameter

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACSample
{
    class Program
    {
        static void Main(string[] args)
        {
            // Example of Lambda Expression with Action method with String as Parameter
            Action<string>  Lambda = (test) => Console.WriteLine(test);

            Lambda("Hai");
            Console.ReadLine();
        }

    }
}
%d