示例#1
0
        //public int CompareTo(object obj)
        //{
        //    if (obj is Véhicule)
        //    {
        //        Véhicule v = (Véhicule)obj;
        //        if (PRK < v.PRK) return -1;
        //        else if (PRK > v.PRK) return 1;
        //        else return 0;
        //    }
        //    else
        //        throw new ArgumentException();

        //}

        public int CompareTo(object obj)
        {
            if (obj is Véhicule)
            {
                Véhicule v = (Véhicule)obj;
                if (this.Prix < v.Prix)
                {
                    return(-1);
                }
                else if (this.Prix > v.Prix)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            else
            {
                throw new ArgumentException();
            }
        }
示例#2
0
 public static void Vidanger(Véhicule v)
 {
 }
示例#3
0
 public static void RetoucherPeinture(Véhicule v)
 {
 }
示例#4
0
 public static void ChangerPneus(Véhicule v)
 {
     var date = v.CarnetEntretien.Keys.Last();
 }