i have base class nodes:
public abstract class node { public virtual string id { get; set; } public abstract string type { get; } } and have other node classes this
public class item : node { public string name {get; set;} public string itemnumber {get; set;} public override string type { { return "item"; } } } there many other classes item class represent different node types, how create method pass node type in , method creates specific node?
look @ factory method creational pattern.
Comments
Post a Comment