using System.Collections.Generic;
public static void Main()
var hashset = new HashSet<Rate>();
var eeRate = new Rate(){Country="EE", Price=3};
Console.WriteLine(hashset.Count + " " + hashset.Contains(eeRate));
Console.WriteLine(hashset.Count + " " + hashset.Contains(eeRate));
public string Country{get;set;}
public int Price{get;set;}
public override int GetHashCode()
return Country.GetHashCode() *2 + Price.GetHashCode() * 561;