Below is a sample code snippet that demonstrates the lambda expression with action method in C#.
Example of Lambda Expression with Action Method in C#
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 Action Lambda = () => Console.WriteLine("Hello World"); Lambda(); Console.ReadLine(); } } }
Leave a Reply