|
using System.Collections;
using System.Collections.Generic;
namespace Storm.TextEditor.Parser.Objects
{
public class PatternComparer : IComparer<Pattern>
{
#region IComparer Members
/// <summary>
/// Compares the specified objects.
/// </summary>
/// <param name="firstObject">The first object.</param>
/// <param name="secondObject">The second object.</param>
/// <returns>The compared length.</returns>
public int Compare(Pattern firstObject, Pattern secondObject)
{
return secondObject.StringPattern.Length.CompareTo(firstObject.StringPattern.Length);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.