Now this class can delegate any processing to another method as long as the return type and parameter type matches the delegate . Below the Program class is using the Playlist class . We declare a new Playlist.ProcessPlaylistDelegate and then we are attaching the getMp3Songs to the delegate . class Program {static void Main (string [] args) {Playlist playlist1 = new Playlist (); // add some songs to the playlist //use the delegate to process the list before it is printed on the screen playlist1.ShowPlaylist (new Playlist.ProcessPlaylistDelegate (GetMp3Songs));}}
នៅក្នុងលំដាប់សម្រាប់ការនាំចេញទៅម៉ូឌុលថ្នាំងដែលអ្នកមានដើម្បីកំណត់មុខងារនីមួយ, វត្ថុឬអថេរ, ដែលតម្រូវឱ្យមានដើម្បីត្រូវបាននាំចេញ, ដែលជាលក្ខណៈសម្បត្តិនៃ 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...