Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Observer Pattern in .NET

, 9 Mar 2004
A mechanism for drastically reducing coupling between interacting classes
observer.zip
ObserverPatternClassic
bin
Debug
ObserverPatternClassic.exe
ObserverPatternClassic.pdb
obj
Debug
temp
TempPE
ObserverPatternClassic.pdb
ObserverPatternClassic.exe
ObserverPatternClassic.exe.incr
App.ico
ObserverPatternClassic.csproj.user
ObserverPatternClassic.suo
observernet.zip
ObserverPattern
bin
Debug
ObserverPattern.exe
ObserverPattern.pdb
obj
Debug
temp
ObserverPattern.projdata
TempPE
ObserverPattern.exe
ObserverPattern.exe.incr
ObserverPattern.pdb
App.ico
ObserverPattern.csproj.user
ObserverPattern.suo
observers.zip
Observers
observer.NET.zip
observer.zip
using System;

namespace ObserverPattern
{
	/// <summary>
	/// Summary description for Library.
	/// </summary>
	public class NationalTravels
	{

		public void UpdateBangaloreAirlinesRout(object Traveller)
		{
			if( Traveller is BangaloreAirlines)
			{
				AddRoutforBangaloreAirlines((BangaloreAirlines)Traveller);

			}

		}

		private void AddRoutforBangaloreAirlines(BangaloreAirlines traveller)
		{
			//Code for adding the new rout to NationalTravel's Travel database.
			Console.WriteLine("new rout No. " +  traveller.TravelRout  + " Added Sucessfully to National Travel's Database");
		}
		
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sunil Kumar K.S
Web Developer
United States United States
Sunil Kumar Works for Wipro Technologies, one of the leading software services company in the world. He is a Microsoft Certified Solution Developer(MCSD) in .NET

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 10 Mar 2004
Article Copyright 2004 by Sunil Kumar K.S
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid