﻿<?xml version="1.0" encoding="utf-8"?><Type Name="IComparer" FullName="System.Collections.IComparer" FullNameSP="System_Collections_IComparer" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class interface public abstract IComparer" /><TypeSignature Language="C#" Value="public interface IComparer" /><TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IComparer" /><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><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This interface is used in conjunction with the <see cref="M:System.Array.Sort(System.Array)" /> and <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" /> methods. It provides a way to customize the sort order of a collection. See the <see cref="M:System.Collections.IComparer.Compare(System.Object,System.Object)" /> method for notes on parameters and return value.</para><para>The default implementation of this interface is the <see cref="T:System.Collections.Comparer" /> class. For the generic version of this interface, see <see cref="T:System.Collections.Generic.IComparer`1" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Exposes a method that compares two objects.</para></summary></Docs><Members><Member MemberName="Compare"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual abstract int32 Compare(object x, object y)" /><MemberSignature Language="C#" Value="public int Compare (object x, object y);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 Compare(object x, object y) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="x" Type="System.Object" /><Parameter Name="y" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The preferred implementation is to use the <see cref="M:System.IComparable.CompareTo(System.Object)" /> method of one of the parameters.</para><para>Comparing null with any type is allowed and does not generate an exception when using <see cref="T:System.IComparable" />. When sorting, null is considered to be less than any other object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.</para><list type="table"><listheader><item><term><para>Value </para></term><description><para>Meaning </para></description></item></listheader><item><term><para>Less than zero </para></term><description><para><paramref name="x" /> is less than <paramref name="y" />. </para></description></item><item><term><para>Zero </para></term><description><para><paramref name="x" /> equals <paramref name="y" />. </para></description></item><item><term><para>Greater than zero </para></term><description><para><paramref name="x" /> is greater than <paramref name="y" />. </para></description></item></list></returns><param name="x"><attribution license="cc4" from="Microsoft" modified="false" />The first object to compare. </param><param name="y"><attribution license="cc4" from="Microsoft" modified="false" />The second object to compare. </param></Docs><Excluded>0</Excluded></Member></Members><TypeExcluded>0</TypeExcluded></Type>