✅ Practicing delegates

I've asked chat GPT to give me some good pseudo applications I could create with .NET, C# to practice everything about delegates. The answer that was given to me is:
Delegates are a powerful feature of C# and .NET that allow for decoupling and modularity in software design. Here are some pseudo applications you could create with C# and .NET to practice using delegates:

Event aggregator: Create an event aggregator that can be used to subscribe to and publish events. Use delegates to define the events and to handle event subscriptions.

Stock ticker: Create a stock ticker that displays real-time stock quotes. Use delegates to define the methods that will be called when new stock quotes are received.

Calculator: Create a calculator that performs basic arithmetic operations. Use delegates to define the methods that will be called when the user selects an operation.

Weather application: Create a weather application that displays current weather conditions and forecasts for a given location. Use delegates to define the methods that will be called to retrieve weather data from various sources.

Chat application: Create a simple chat application that allows users to send messages to each other. Use delegates to define the methods that will be called to handle incoming and outgoing messages.

File watcher: Create a file watcher that monitors a folder for changes and alerts the user when a new file is added or an existing file is modified. Use delegates to define the methods that will be called when a file change is detected.

Image editor: Create an image editor that allows users to apply filters and effects to images. Use delegates to define the methods that will be called to apply the filters and effects.
Delegates are a powerful feature of C# and .NET that allow for decoupling and modularity in software design. Here are some pseudo applications you could create with C# and .NET to practice using delegates:

Event aggregator: Create an event aggregator that can be used to subscribe to and publish events. Use delegates to define the events and to handle event subscriptions.

Stock ticker: Create a stock ticker that displays real-time stock quotes. Use delegates to define the methods that will be called when new stock quotes are received.

Calculator: Create a calculator that performs basic arithmetic operations. Use delegates to define the methods that will be called when the user selects an operation.

Weather application: Create a weather application that displays current weather conditions and forecasts for a given location. Use delegates to define the methods that will be called to retrieve weather data from various sources.

Chat application: Create a simple chat application that allows users to send messages to each other. Use delegates to define the methods that will be called to handle incoming and outgoing messages.

File watcher: Create a file watcher that monitors a folder for changes and alerts the user when a new file is added or an existing file is modified. Use delegates to define the methods that will be called when a file change is detected.

Image editor: Create an image editor that allows users to apply filters and effects to images. Use delegates to define the methods that will be called to apply the filters and effects.
Wanted to ask you guys what you thought about this and maybe someone has some more input for me. Maybe a suggestion with which one I should start? I am not new to delegates, but I have never truly dedicated an application to practice delegates.
14 Replies
Klarth
Klarth2y ago
Not worth the time investment, IMO. Practice them when you actually need to because you hardly use delegate directly in typical code bases. You'll use lambdas / Func / Action way more than delegate. The calculator is the easiest option: defining binary and unary delegates. You're done with a basic console calculator app in probably < 300 LoC.
growlingOwl
growlingOwlOP2y ago
@Klarth then I suppose it would be better to practice concurrency? async/await?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
growlingOwl
growlingOwlOP2y ago
Nice!! I appreciate the info!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
growlingOwl
growlingOwlOP2y ago
thats fine 😉
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
growlingOwl
growlingOwlOP2y ago
nice
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
growlingOwl
growlingOwlOP2y ago
Do you think this is an effective way to learn and practice?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
growlingOwl
growlingOwlOP2y ago
yes. it's clear 🙂
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server