Skip to content

ngtduc693/Observer-Pattern-in-CSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Observer Pattern in C#

Observer Pattern in C#

  • Description: The code below simulates how you get notifications from celebrities you follow on Facebook using the Observer in C#.
  • Input: None
  • Output:

--> System notification: 1 person just follow you!. You have: 1 follower
Hello Follower 1! You have a message from your crush: I'm hungry

--> System notification: 1 person just follow you!. You have: 2 follower
Hello Follower 1! You have a message from your crush: I'm boring
Hello Follower 2! You have a message from your crush: I'm boring

--> System notification: 1 person just follow you!. You have: 3 follower
Hello Follower 1! You have a message from your crush: I have a boyfriend
Hello Follower 2! You have a message from your crush: I have a boyfriend
Hello Follower 3! You have a message from your crush: I have a boyfriend

--> System notification: 1 person just UN-follow you!. You have: 2 follower
Hello Follower 1! You have a message from your crush: I will go to Vietnam
Hello Follower 3! You have a message from your crush: I will go to Vietnam
Hello Follower 1! You have a message from your crush: I I just broke up with him
Hello Follower 3! You have a message from your crush: I I just broke up with him

--> System notification: 1 person just follow you!. You have: 3 follower
Hello Follower 1! You have a message from your crush: I have been lived in here for 1 day, the best country that I know
Hello Follower 3! You have a message from your crush: I have been lived in here for 1 day, the best country that I know
Hello Follower 2! You have a message from your crush: I have been lived in here for 1 day, the best country that I know

About

Observer Pattern in C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages