Saturday 2 December 2017

C# Program to Illustrate Actions


Code:

using System;

class Program
{
    static void Main()
    { 
        Action action1 =(int x) => Console.WriteLine("OUTPUT {0}", x);
        Action action2 =(x, y) => Console.WriteLine("OUTPUT {0} and {1}", x, y);
        action1.Invoke(1111);
        action2.Invoke(200, 3000);
        Console.Read();
    }
}


Output:

OUTPUT 1111
OUTPUT 200 and 3000


More C# Programs:























100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...