Beispiel #1
0
        static void Main(string[] args)
        {
            MediaPlayer myPlayer = new MediaPlayer();
            myPlayer.Play();

            ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            MediaPlayer myPlayer = new MediaPlayer();
            myPlayer.Play();

            MediaPlayer youPlayer = new MediaPlayer();
            AllTracks yourMusic = youPlayer.GetAllTracks();

            Console.ReadLine();
        }
Beispiel #3
0
        static void Main( string[] args )
        {
            Console.WriteLine("***** Fun with Lazy Instantiation *****\n");

            // No allocation of AllTracks object here!
            MediaPlayer myPlayer = new MediaPlayer();
            myPlayer.Play();

            // Allocation of AllTracks happens when you call GetAllTracks().
            MediaPlayer yourPlayer = new MediaPlayer();
            AllTracks yourMusic = yourPlayer.GetAllTracks();

            Console.ReadLine();
        }
 static void Main(string[] args) {
     MediaPlayer mp = new MediaPlayer();
     mp.Play();
     mp.GetAllTracks();
     Console.ReadLine();
 }