Пример #1
0
        public static void Add(TextPaper item)
        {
            if (item.GetType() == typeof(Book))
            {
                BookStorage.AddItem(item as Book);
                return;
            }

            if (item.GetType() == typeof(Jornal))
            {
                JornalStorage.AddItem(item as Jornal);
                return;
            }

            if (item.GetType() == typeof(NewsPaper))
            {
                NewsPaperStorage.AddItem(item as NewsPaper);
                return;
            }
        }