Esempio n. 1
0
        public bool Equals(StoredCar other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Model.Equals(other.Model) &&
                   Position.Equals(other.Position) &&
                   Math.Abs(Heading - other.Heading) < 0.001 &&
                   Math.Abs(Pitch - other.Pitch) < 0.001 &&
                   Traction.Equals(other.Traction) &&
                   Flags.Equals(other.Flags) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   Radio.Equals(other.Radio) &&
                   Extra1.Equals(other.Extra1) &&
                   Extra2.Equals(other.Extra2));
        }
Esempio n. 2
0
        public static void Start()
        {
            Traction bmw = new Traction(1233, 2344);

            try
            {
            }
            catch (IndexOutOfRangeException ex)
            {
            }
            catch (Exception ex)
            {
                if (ex is EmptyTankExeption)
                {
                }
                else
                {
                }
            }
            finally
            {
                Console.WriteLine("Program is complited");
            }
        }