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

КОМЕНТАРІ •

  • @manudelmarche
    @manudelmarche 4 роки тому +17

    So in 15 minutes I got exactly what I needed to fully understand the observable pattern in C#. Subscribed immediately!

  • @vchirilov
    @vchirilov 2 роки тому +1

    Isn't it better to inject ISubject via constructor in observer?

  • @achilleskocaeli
    @achilleskocaeli 4 роки тому

    Excellent.. Excellent... Excellent. I love you man. I now got Observer Pattern

  • @mireazma
    @mireazma 4 роки тому +1

    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!

  • @abdelrhmanahmed1378
    @abdelrhmanahmed1378 3 роки тому +1

    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)

  • @rosian23
    @rosian23 4 роки тому +1

    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

  • @letticiadlamini1009
    @letticiadlamini1009 3 роки тому +1

    I subscribed right after watching the video. Was really helpful.

  • @MrMattberry1
    @MrMattberry1 3 місяці тому

    String interpolation would be nicer, good video though. I would probably use pub sub through redis

  • @GesikaMarie
    @GesikaMarie 4 роки тому +1

    Thanks for the quick and clear explanation!

  • @ricomarcelo5521
    @ricomarcelo5521 3 роки тому +1

    Awesome tutorial! Clear and concise. Thanks much!

  • @DeependraJoshi-y5u
    @DeependraJoshi-y5u Рік тому

    Beautiful explanation... Thank You.

  • @bmochoi4482
    @bmochoi4482 4 роки тому +2

    It is very clear explanation. Thanks.

  • @ragtop63
    @ragtop63 11 місяців тому

    What's the difference between creating all of this observer pattern code vs just using events and subscribing to those events?

    • @CodeRadiance
      @CodeRadiance  11 місяців тому

      It's just to show you how it all works but ofcourse you can do your custom implementation as well.

  • @mdeqbalansari
    @mdeqbalansari 4 роки тому +1

    Very nice explanation... Kudos

  • @gorangratte2471
    @gorangratte2471 3 роки тому

    Should we really pass the subject with a public Notify() and expose that method to every observer?

  • @i.a.9776
    @i.a.9776 2 роки тому

    Can u post a good tutorial for osberver in C# ?

  • @sivaperuman1219
    @sivaperuman1219 4 роки тому +1

    Nice explanation. Thanks for your quick demo..

  • @lizethgarayreyes4784
    @lizethgarayreyes4784 3 роки тому

    Alguien me puede decir donde encontrar el codigo?

  • @miguelangelromar
    @miguelangelromar 3 роки тому

    Perfectly simple and very clear explanation.
    Thx.
    (I subscribe to your channel )

  • @alicakil6935
    @alicakil6935 2 роки тому

    Very nice explanation. thank you

  • @SublimeCS
    @SublimeCS 3 роки тому

    Excellent video

  • @sufisayyad4432
    @sufisayyad4432 3 роки тому

    Simple and easy 👍👌

  • @idopin
    @idopin 5 років тому

    very presice and clear, this is the exact explanation i was looking for!

  • @AsierWillyams
    @AsierWillyams 4 роки тому

    Thank youu!!! I understand it perfectly :)

  • @Incrazyboyy
    @Incrazyboyy 5 років тому

    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.

    • @CodeRadiance
      @CodeRadiance  5 років тому

      Thanks for the review! All the best for your test.

  • @09harikesh
    @09harikesh 5 років тому +1

    easy nd crisp

  • @irrefl1672
    @irrefl1672 5 років тому

    its not ikual tu null.

  • @AjaySingh-fq4fz
    @AjaySingh-fq4fz 5 років тому +1

    Nicley explain

  • @hadhebola
    @hadhebola Рік тому

    The code is not your repo

  • @Skartcher
    @Skartcher 2 роки тому

    weather estation

  • @uwehomm8686
    @uwehomm8686 4 роки тому

    good Job :-)

  • @Infinity-Minus-One
    @Infinity-Minus-One 3 місяці тому

    Maybe talk more clearly and slowly