I would like to avoid instanciating certain class with new, and force to use the factory class.
But I don't understand how to do that.
Can someone show me a little sample ?
Thanks in advance for any help, Best regards
I would like to avoid instanciating certain class with new, and force to use the factory class.
But I don't understand how to do that.
Can someone show me a little sample ?
Thanks in advance for any help, Best regards
Here's something that should get you started. You will need to add your own logic for determining whether instances any given type should be allowed to instantiated via newing.