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

Delegate Factory

, 10 Jan 2005 CPOL
A dynamic factory using delegates.
delegatefactory_demo.zip
Objects
Objects.csproj.user
TestFactory
App.ico
TestFactory.csproj.user
using System;

namespace Objects
{
	#region Delegates

	/// <summary>
	/// A handler function for the factory to create objects;
	/// </summary>
	public delegate AObject ObjectCreator(params object [] list);

	#endregion

	/// <summary>
	/// Summary description for AObject.
	/// </summary>
	public abstract class AObject
	{
		#region Override

		/// <summary>
		/// Force all descendents to implement.
		/// </summary>
		public abstract void Print();

		#endregion

		#region protected

		/// <summary>Some variable to play with.</summary>
		protected Int32 m_nType;

		#endregion
	}
}

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

Asa Meltzer
Software Developer
Israel Israel
Software designer and programmer.
Programming languages:
MFC, C++, Java , C#, VB and sometimes C and assembly.

| Advertise | Privacy | Mobile
Web04 | 2.8.141029.1 | Last Updated 11 Jan 2005
Article Copyright 2005 by Asa Meltzer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid