Assembly: mscorlib (in mscorlib.dll)
action is a null reference (Nothing in Visual Basic).
The Action is a delegate to a method that performs an action on the object passed to it. The elements of the current List are individually passed to the Action delegate.
This method is an O(n) operation, where n is Count.
The following example demonstrates the use of the Action delegate to print the contents of a List object. In this example the Print method is used to display the contents of the list to the console.
In addition to displaying the contents using the Print method, the C# example demonstrates the use of anonymous methods to display the results to the console.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.