开发者

My User control belonging to which Design Pattern?

I am creating a reusable component in C#.net. For that i have started a Control Library project and added a Control.

Class MyControl : Control{}

My user control just displays some images which will be used in many Windows Applications.

Can you please tell me which design pattern i am using here. I am unable to decide which pattern they belongs.

Thanks

Added:- What suppose for any problem my solution is to create a user control. Then i am following to which design pattern now????

See all 开发者_运维问答the design pattern and lets deside. http://en.wikipedia.org/wiki/Software_design_pattern


I'm not sure that we could say that you are following any design pattern, it's just basic Inheritance from what you describe which is a OOP principle not a design pattern. The process should be to identify which design patterns solve your problem and then implement them. Trying to do it in reverse is unlikely to reveal a pattern or if it does then I'd suspect the implementation would only very loosely follow said pattern.


  • inheritance & abstraction - OOP's features to have a re-usable component

Don't think there is any design pattern involved here...

HTH


It does not sound to me like you are using any particular design pattern. At best, you are writing reusable code, but I don't think that is a design pattern in it's own right.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜