Esempio n. 1
0
        public int CompareTo(ClassOffert other)
        {
            int price1 = 0, price2 = 0;

            try
            {
                price1 = int.Parse(other.Cena.Replace("zł", "").Replace(" ", ""));
                price2 = int.Parse(Cena.Replace("zł", "").Replace(" ", ""));
            }catch
            {
                price1 = getNumber(other.Cena);
                price2 = getNumber(other.Cena);
            }
            return(price2.CompareTo(price1));
        }