The first method will only include cd songs and the second method will include all the songs . This is just a simple example but we can add as much processing as we require without having to touch the class Playlist . playlist1.ShowPlaylist (new Playlist.ProcessPlaylistDelegate (GetCdSongs)); playlist1.ShowPlaylist (new Playlist.ProcessPlaylistDelegate (GetAllSongs));
នៅក្នុងលំដាប់សម្រាប់ការនាំចេញទៅម៉ូឌុលថ្នាំងដែលអ្នកមានដើម្បីកំណត់មុខងារនីមួយ, វត្ថុឬអថេរ, ដែលតម្រូវឱ្យមានដើម្បីត្រូវបាននាំចេញ, ដែលជាលក្ខណៈសម្បត្តិនៃ modules.exports បានជំទាស់. Exporting In this example the module file is robot.js . Each function, object or variable we would like to make available to other files we make them properties...