c#,actions

Kerim 8/12/2016 0

This Code Illustrates Actions

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

/*
Here is the output of the C# Program: OUTPUT 1111 OUTPUT 200 and 3000

*/

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments