Click or drag to resize
ComparisonBasedComparerT Class
Generic comparer which uses a comparison func to implement the compare method
Inheritance Hierarchy
SystemObject
  System.Collections.GenericComparerT
    SD.Tools.Algorithmia.UtilityClassesComparisonBasedComparerT

Namespace:  SD.Tools.Algorithmia.UtilityClasses
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.2.0.0 (1.2.16.0406)
Syntax
public class ComparisonBasedComparer<T> : Comparer<T>

Type Parameters

T

The ComparisonBasedComparerT type exposes the following members.

Constructors
  NameDescription
Public methodComparisonBasedComparerT
Initializes a new instance of the ComparisonBasedComparerT class.
Top
Properties
  NameDescription
Public propertyFlipCompareResult
Gets or sets the flag which, if set to true, makes the Compare method flip its result: -1 becomes 1 and 1 becomes -1. This flag can be used to use the comparer in descending sorted lists.
Top
Methods
  NameDescription
Public methodCompare
Compares the two passed in elements using the set compareFunc.
(Overrides ComparerTCompare(T, T).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIComparerCompare (Inherited from ComparerT.)
Top
See Also