예제 #1
0
 static void Main(string[] args)
 {
     Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
     Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);
     t1.showTransaction();
     t2.showTransaction();
     Console.ReadKey();
 }
예제 #2
0
        static void Main(string[] args)
        {
            Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
             Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);
             t1.showTransaction();
             t2.showTransaction();

             #region Polymorphism using Interface

              System.Console.WriteLine(System.Environment.NewLine);

              IShape IShapeRec = new Rectangle();
              IShapeRec.Draw();

              IShape IShapeCir = new Circle();
              IShapeCir.Draw();

              IShape IShapeTri = new Triangle();
              IShapeTri.Draw();

             #endregion

             Console.ReadKey();
        }