mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-15 00:47:02 +02:00
Updated Utilities
This commit is contained in:
parent
0ee776be98
commit
c73761d36c
6 changed files with 289 additions and 21 deletions
21
Utilities/Comparers/ReverseComparer.cs
Normal file
21
Utilities/Comparers/ReverseComparer.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Utilities
|
||||
{
|
||||
public class ReverseComparer<T> : IComparer<T>
|
||||
{
|
||||
private IComparer<T> m_comparer;
|
||||
|
||||
public ReverseComparer(IComparer<T> comparer)
|
||||
{
|
||||
m_comparer = comparer;
|
||||
}
|
||||
|
||||
public int Compare(T x, T y)
|
||||
{
|
||||
return m_comparer.Compare(y, x);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue