Click here to Skip to main content
13,045,001 members (42,735 online)
Click here to Skip to main content

Stats

46.6K views
43 bookmarked
Posted 10 Jan 2005

Delegate Factory

, 10 Jan 2005
A dynamic factory using delegates.
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.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 11 Jan 2005
Article Copyright 2005 by Asa Meltzer
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid