|
using System;
using Objects;
namespace TestFactory
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class3 : AObject
{
#region Constants
/// <summary>
/// The class type identifier.
/// </summary>
public const Int32 ClassType = 3;
#endregion
#region C'tor
/// <summary>
/// Default C'tor.
/// </summary>
internal Class3()
{
this.m_nType = ClassType;
}
#endregion
#region Overrides
/// <summary>
/// Implementation of Print.
/// </summary>
public override void Print()
{
String msg = String.Format("Class: {0, 20} Value: {1, 10}", ToString(), m_nType*23);
Console.WriteLine(msg);
}
#endregion
#region Static
/// <summary>
/// A handler function for the factory to create objects;
/// </summary>
/// <param name="list">The parameter list.</param>
/// <returns>A Class3 object.</returns>
public static AObject ObjectCreator(params object[] list)
{
return new Class3();
}
#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.
Software designer and programmer.
Programming languages:
MFC, C++, Java , C#, VB and sometimes C and assembly.