C# Observer Pattern Example
Вставка
- Опубліковано 1 січ 2025
- Observer design pattern in c# can be very useful in a lot of different scenarios.
Watch this video and learn how to implement the observer design pattern in your projects.
►►►SUBSCRIBE for more: www.youtube.co...
----------My Social Links:
🔴 My Channel: / codefirst
🔴 View Playlists: / codefirst
🔴 My Github: github.com/Nitij
So in 15 minutes I got exactly what I needed to fully understand the observable pattern in C#. Subscribed immediately!
Agree, no need to hunt more..
Isn't it better to inject ISubject via constructor in observer?
Excellent.. Excellent... Excellent. I love you man. I now got Observer Pattern
2 cents: in the most compact form of an observer pattern you don't need a subject parameter in Update(). You only need it if you do something based on the subject like the _celsius_ temperature. Or if there are multiple subjects.
Nice explanation BTW!
observer can update the temp through the object you send to him ,and that will crash the program, due to continue calling the notify each time and then we set ,notify ,,, (stack overflow)
Something seems off, in NewsAgency -> Update method after casting to WeatherStation I have access to Notify method, I should not have so that I don't call it explicitly
I subscribed right after watching the video. Was really helpful.
String interpolation would be nicer, good video though. I would probably use pub sub through redis
Thanks for the quick and clear explanation!
Awesome tutorial! Clear and concise. Thanks much!
Beautiful explanation... Thank You.
It is very clear explanation. Thanks.
You are welcome!
What's the difference between creating all of this observer pattern code vs just using events and subscribing to those events?
It's just to show you how it all works but ofcourse you can do your custom implementation as well.
Very nice explanation... Kudos
Should we really pass the subject with a public Notify() and expose that method to every observer?
Can u post a good tutorial for osberver in C# ?
Nice explanation. Thanks for your quick demo..
You are welcome!
Alguien me puede decir donde encontrar el codigo?
Perfectly simple and very clear explanation.
Thx.
(I subscribe to your channel )
Very nice explanation. thank you
Excellent video
Simple and easy 👍👌
very presice and clear, this is the exact explanation i was looking for!
Thank youu!!! I understand it perfectly :)
Thank you, this will get me a better grade at my test tomorrow!
Feedback: The explanation throughout the video was very good - at the beginning however, the part with the interfaces was lacking details.
Thanks for the review! All the best for your test.
easy nd crisp
its not ikual tu null.
Nicley explain
The code is not your repo
weather estation
good Job :-)
Maybe talk more clearly and slowly