예제 #1
0
        public void testMultiplication()
        {
            Dollar five = new Dollar(5);

            five.times(2);
            Assert.AreEqual(10, five.amount);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Dollar d = new Dollar()
            {
                money = 5
            };
            Ruble r = new Ruble()
            {
                money = 5
            };

            Console.WriteLine(d > r);
            Console.WriteLine((d + r).money);
            Console.WriteLine((d - r).money);
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            Dollar dollar = obj as Dollar;

            return(dollar.Amount == Amount);
        }