示例#1
0
文件: Program.cs 项目: RikLaa/Demo04
        static void Main(string[] args)
        {
            Floppy diskette = new Floppy();
            diskette.Type = "Floppy";
            diskette.Size = 1.44;
            diskette.SaveData();
            diskette.Color = "Green";
            Console.WriteLine(diskette.ToString());

            Cd Roadrunner = new Cd();
            Roadrunner.Artist = "Hurriganes";
            Roadrunner.Type = "Audio cd";
            Roadrunner.Size = 800;
            Roadrunner.TrackNumber = 11;
            Roadrunner.TrackNumber = 30;
            Console.WriteLine(Roadrunner.ToString());

            Dvd Movie = new Dvd();
            Movie.Type = "Movie DVD";
            Movie.MovieName = "The Revenant";
            Movie.Size = 50000;
            Movie.DualLayer = true;
            Movie.SaveData();
            Movie.SaveData();
            Console.WriteLine(Movie.ToString());

            Console.ReadLine();
        }
示例#2
0
文件: Program.cs 项目: Eisseri/Demo4
        static void Main(string[] args)
        {
            Kirja kirja = new Kirja("Matematic 1", "Top of the bookcase", "No", "No idea");
            Console.WriteLine("Kirja = " + kirja.ToString());

            Dvd dvd = new Dvd("Titanic", "404 not found", "Yes", "James Cameron");
            Console.WriteLine("Dvd = " + dvd.ToString());
        }