Пример #1
0
        static void Main(string[] args)
        {
            MediaPlayer myPlayer = new MediaPlayer();
            myPlayer.Play();

            ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            MediaPlayer myPlayer = new MediaPlayer();
            myPlayer.Play();

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

            Console.ReadLine();
        }
Пример #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();
        }
Пример #4
0
 static void Main(string[] args) {
     MediaPlayer mp = new MediaPlayer();
     mp.Play();
     mp.GetAllTracks();
     Console.ReadLine();
 }