File: IComparable.xml

package info (click to toggle)
monodoc 1.1.18-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 58,432 kB
  • ctags: 4,991
  • sloc: xml: 718,392; cs: 38,337; sh: 3,172; perl: 554; makefile: 303
file content (98 lines) | stat: -rwxr-xr-x 4,550 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<Type Name="IComparable" FullName="System.IComparable" FullNameSP="System_IComparable" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class interface public abstract IComparable" />
  <TypeSignature Language="C#" Value="public interface IComparable" />
  <MemberOfLibrary>BCL</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
  </AssemblyInfo>
  <Docs>
    <summary>
      <para> Implemented by classes that support an ordering of instances of the class.</para>
    </summary>
    <remarks>
      <para>
        <block subset="none" type="note">
          <see cref="T:System.IComparable" /> contains the
<see cref="M:System.IComparable.CompareTo(System.Object)" /> method. The consumer of an object should call this 
 method when sorting instances of a class.</block>
      </para>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName="CompareTo">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual abstract int32 CompareTo(object obj)" />
      <MemberSignature Language="C#" Value="public int CompareTo (object obj);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="obj" Type="System.Object" />
      </Parameters>
      <Docs>
        <summary>
          <para> Returns the sort order of the current instance compared 
      to the specified
      object.</para>
        </summary>
        <param name="obj">The <see cref="T:System.Object" /> to compare to the current instance.</param>
        <returns>
          <para>A <see cref="T:System.Int32" /> containing a value that reflects the sort order of the
   current instance as compared to object. The following table defines the conditions under which the returned value is a negative
   number, zero, or a positive number.</para>
          <list type="table">
            <listheader>
              <term>Returned Value </term>
              <description>Description </description>
            </listheader>
            <item>
              <term> Any negative value </term>
              <description> The current instance is &lt; <paramref name="obj" />. </description>
            </item>
            <item>
              <term> Zero </term>
              <description>The current instance is ==
   <paramref name="obj" />. </description>
            </item>
            <item>
              <term> Any positive value </term>
              <description> The current instance is &gt; than <paramref name="obj" /> or <paramref name="obj" /> is a null
   reference. </description>
            </item>
          </list>
        </returns>
        <remarks>
          <block subset="none" type="behaviors">
            <para>For any objects A, B and C, the following are required to be true:</para>
            <para>A.CompareTo(A) is required to return zero. </para>
            <para>If A.CompareTo(B) returns zero then B.CompareTo(A) is required to return zero.</para>
            <para>If A.CompareTo(B) returns zero and B.CompareTo(C) 
         returns zero then A.CompareTo(C) is required to return zero.</para>
            <para>If A.CompareTo(B) returns a value other than zero then 
         B.CompareTo(A) is required to return a value of the opposite
         sign.</para>
            <para>If A.CompareTo(B) returns a value <paramref name="x" /> not equal 
      to zero, and B.CompareTo(C) returns a value <paramref name="y" /> of the same sign as
   <paramref name="x" />, then A.CompareTo(C) is required to a value of the same sign as 
   <paramref name="x" /> and <paramref name="y" /> 
   .</para>
            <para>The exact behavior of this method is unspecified. The intent of this method is
   to provide a mechanism that orders instances of a class in a manner that is
   consistent with the mathematical definitions of the relational operators (&lt;,
   &gt;, and ==), without regard for class-specific definitions of the
   operators.</para>
          </block>
          <para>
            <block subset="none" type="usage">Use the <see cref="M:System.IComparable.CompareTo(System.Object)" /> method to determine the ordering of instances of a
class.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
  <Interfaces />
</Type>