concept Action in category .net

This is an excerpt from Manning's book Rx.NET in Action.
Lambda expressions are used heavily with Rx because they make your processing pipeline short and expressive, which is cool! But you still have the requirement to create new delegate types each time you want to specify a method signature for the method types to which you want to receive a reference, which is far from ideal. That’s why you usually won’t create new delegate types but instead use Action and Func.
Action is a delegate type that can receive parameters but returns no value. The .NET Framework contains 17 definitions of Func and Action, each for different numbers of parameters that the referenced method receives. The Func and Action types are located under the System namespace in the mscorlib assembly.
To reference a method that has no parameters and doesn’t return a value, you use the following definition of Action:
public delegate void Action();and for a method that has two parameters and doesn’t return a value, you use this definition of Action:
public delegate void Action<in T1, in T2>(T1 arg1, T2 arg2);To use the Action delegate, you need to specify the types of parameters. Here’s an example of a method that traverses a collection and makes an operation on each item by using an Action of an integer: