M
Michel Walsh
I got a class which implements a comparison test:
public class CompareMarque : ICompare<Marque>
{
public int Compare( Marque x, Marque y)
{
...some funny rules
}
// but I also want to be able to use the same funny rules in a static way,
so I added:
public static int Comparez( Marque x, Marque y)
{
... SAME funny rules
}
}
Question: is there a way to AVOID code duplication of the "funny rules"
(since it seems that a static method CANNOT be used to implement ICompare) ?
Vanderghast, Access MVP
public class CompareMarque : ICompare<Marque>
{
public int Compare( Marque x, Marque y)
{
...some funny rules
}
// but I also want to be able to use the same funny rules in a static way,
so I added:
public static int Comparez( Marque x, Marque y)
{
... SAME funny rules
}
}
Question: is there a way to AVOID code duplication of the "funny rules"
(since it seems that a static method CANNOT be used to implement ICompare) ?
Vanderghast, Access MVP