do not check order sequence if option /order was not used
[mono.git] / mcs / class / corlib / Documentation / en / System / Action`1.xml
1 <Type Name="Action&lt;T&gt;" FullName="System.Action&lt;T&gt;">
2   <TypeSignature Language="C#" Value="public delegate void Action&lt;in T&gt;(T obj);" />
3   <AssemblyInfo>
4     <AssemblyName>mscorlib</AssemblyName>
5     <AssemblyVersion>2.0.0.0</AssemblyVersion>
6     <AssemblyVersion>4.0.0.0</AssemblyVersion>
7   </AssemblyInfo>
8   <TypeParameters>
9     <TypeParameter Name="T">
10       <Constraints>
11         <ParameterAttribute>Contravariant</ParameterAttribute>
12       </Constraints>
13     </TypeParameter>
14   </TypeParameters>
15   <Base>
16     <BaseTypeName>System.Delegate</BaseTypeName>
17   </Base>
18   <Parameters>
19     <Parameter Name="obj" Type="T" />
20   </Parameters>
21   <ReturnValue>
22     <ReturnType>System.Void</ReturnType>
23   </ReturnValue>
24   <Docs>
25     <typeparam name="T">The type.   </typeparam>
26     <param name="obj">The object on which to perform an action.</param>
27     <summary>A delegate to a method that returns no values, and takes one parameter.</summary>
28     <remarks>Since the compiler can infer the types, you do not need to provide the type, this is typically used with the <see cref="T:System.Array.Foreach" /> method or the <see cref="T:System.Collections.Generic.List" />'s ForEach method.
29
30 <example><code lang="C#">
31 //
32 // Simple "echo" implementation
33 //
34 using System;
35
36 class X {
37
38         static void Main (string [] args)
39         {
40                 Array.ForEach (args, print);
41                 Console.WriteLine ();
42         }
43
44         static void print (string a)
45         {
46                 Console.Write (a);
47                 Console.Write (" ");
48         }
49 }
50   </code></example></remarks>
51     <since version=".NET 2.0" />
52   </Docs>
53 </Type>