1 <Type Name="Comparison<T>" FullName="System.Comparison<T>">
2 <TypeSignature Language="C#" Value="public delegate int Comparison<in T>(T x, T y);" />
4 <AssemblyName>mscorlib</AssemblyName>
5 <AssemblyVersion>2.0.0.0</AssemblyVersion>
6 <AssemblyVersion>4.0.0.0</AssemblyVersion>
9 <TypeParameter Name="T">
11 <ParameterAttribute>Contravariant</ParameterAttribute>
16 <BaseTypeName>System.Delegate</BaseTypeName>
19 <Parameter Name="x" Type="T" />
20 <Parameter Name="y" Type="T" />
23 <ReturnType>System.Int32</ReturnType>
26 <typeparam name="T">To be added.</typeparam>
27 <param name="x">The first object to compare.</param>
28 <param name="y">The second object to compare.</param>
30 <para>Represents the method that compares two objects of the same type.</para>
33 <para>A <see cref="T:System.Int32" /> containing a value that reflects the sort order of the objects.</para>
37 <description>Condition</description>
40 <term>Less than zero</term>
42 <paramref name="x" /> is less than <paramref name="y" />.</description>
48 <paramref name="x" /> equals <paramref name="y" />.</description>
51 <term>Greater than zero</term>
53 <paramref name="x" /> is greater than <paramref name="y" />.</description>
58 <para>A <see cref="T:System.Int32" /> containing a value that reflects the sort order of the objects.</para>
62 <description>Condition</description>
65 <term>Less than zero</term>
67 <paramref name="x" /> is less than <paramref name="y" />.</description>
73 <paramref name="x" /> equals <paramref name="y" />.</description>
76 <term>Greater than zero</term>
78 <paramref name="x" /> is greater than <paramref name="y" />.</description>
82 <value>To be added.</value>
84 <block subset="none" type="note">
85 <para>This delegate is used by the method <see cref="M:System.Array.Sort(T[], Comparison<T>)" /><see langword="(T[], Comparison<T>)" />, and in <see cref="T:System.Collections.Generic.List<T> " />to sort the elements of the collection.</para>
88 <since version=".NET 2.0" />