Content deleted Content added
Tag: repeating characters |
No edit summary |
||
Line 94:
== Reply ==
Sorry if this is written unclearly. Appreciate the editing help. The intention is to say that since the strategy pattern usually has read/write properties of type interface, and the example has a read only property of type interface with the only way to set the "strategy" interface is via the constructor. That's what I mean by slightly modified implementation of the strategy pattern. Having a generic list of interfaces is completely unrelated to the strategy pattern. Thanks! <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/76.126.198.46|76.126.198.46]] ([[User talk:76.126.198.46|talk]]) 20:55, 11 April 2009 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
== C# code should be simplified ==
The C# code mentions the use of interfaces then implements polymorphism in two ways. It use an abstract base class (AnimalBase) and an interface (IAnimal). I suggest the example just use an interface for simplicity (or at least the commentary should explain what is happening). A second example using an abstract base class could also be included or, alternatively, a note that it can be done in almost identical fashion to the C++ abtract (pure virtual) base class.
Also the use of "var" might be best (and is easily) avoided. Not everyone is using the latest version of C# and it does not hurt the example to not use it.
[[User:AndrewWPhillips|AndrewWPhillips]] ([[User talk:AndrewWPhillips|talk]]) 20:29, 25 June 2009 (UTC)
|