Now we can process the Playlist before printing it . // show the playlist using another function attached to ProcessPlaylistDelegate public void ShowPlaylist (ProcessPlaylistDelegate processPlaylist) {foreach (Song song in this.list) {if (processPlaylist (song)) {Console.WriteLine (" Song Title: {0}", song.Title);}}} 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));}}
ដើម្បីបិទ 'សេចក្តីថ្លែងការណ៍កុងសូលមិនរំពឹងទុក។’ (គ្មានកុងសូល) កំហុសក្នុងការ Eslint, អ្នកត្រូវការដើម្បីបន្ថែមក្បួននៅក្នុងឯកសារ .eslintrc.json នេះ. នៅក្នុងផ្នែកច្បាប់នៃឯកសារ .eslintrc.json បន្ថែមបន្ទាត់ដូចខាងក្រោម: “គ្មានកុងសូល”:0 ការនេះនឹងបិទកំហុស. អ្នកអាចធ្វើការជំនួសវិញ: “គ្មានកុងសូល”: “បិទ” ការនេះនឹងធ្វើរឿងដូចគ្នា, which is turn off any...