Declares a custom type comparer.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public class ComparerAttribute : AbstractComparerAttribute
Visual Basic (Declaration)
Public Class ComparerAttribute _
	Inherits AbstractComparerAttribute

Remarks

That attribute must be used on a static method which takes 2 parameters of the same type, and return a Int32 value.

Examples

CopyC#
public class MyComparers
{
    [Comparer]
    public static int Compare(Foo x, Foo y)
    {
        return /* Insert comparison logic here... */
    }
}

Inheritance Hierarchy

See Also