You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
804 B
29 lines
804 B
// ========================================================================
|
|
//
|
|
// Copyright (C) 2016-2017 MARC CHEVALDONNE
|
|
// marc.chevaldonne.free.fr
|
|
//
|
|
// Module : NounoursNbPoilsEqualityComparer.cs
|
|
// Author : Marc Chevaldonné
|
|
// Creation date : 2016-09-29
|
|
//
|
|
// ========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace ex_023_015_DictionaryCustomType
|
|
{
|
|
class NounoursNbPoilsEqualityComparer : EqualityComparer<Nounours>
|
|
{
|
|
public override bool Equals(Nounours x, Nounours y)
|
|
{
|
|
return x.NbPoils == y.NbPoils;
|
|
}
|
|
|
|
public override int GetHashCode(Nounours obj)
|
|
{
|
|
return obj.NbPoils;
|
|
}
|
|
}
|
|
}
|