设计模式中的抽象或接口

设计模式中的抽象或接口

问题描述:

Group,

这个问题非常具体针对C#中的设计模式实现。很少有设计模式,其中一个可以使用抽象类或接口实现工厂模式。

This question is very specific to the design pattern implementation in C#. There are quite few design patter one of them ids Factory pattern that could be implemented either using the abstract class or interface.

我读过的一些内容,当涉及到C#中的设计模式时,我最好使用它抽象类即使我们可能没有使用抽象类功能,而不是 界面。

Some where I read , when it comes to design patterns in C# , it i better to use abstract classes even though we may not be using abstract class features, instead of  Interface.

关于 的任何想法这个。

Any thoughts on  this.

谢谢

Gags

是的你是对的我也建议如果可能使用抽象类 因为它将使我们在未来扩展设计具有更好的可渗透性,但是抽象类比interfase更重要。

yes you are right I too suggest if possible use Abstract class  as it will give us the better fluxibility to extend the design in future, but abstact classes are litle bit heavier than interfase.

问候诉Pramod