New answers tagged interfaces
0
votes
What are the tradeoffs between a Union type or a wrapper Class to represent a formatted string argument representing multiple types
If you want separate Types for Foo and Bar the union approach is flawed. After you parse the string you need to check for null to see what if any Type was parsed. As you add more types you will have ...
1
vote
What are the tradeoffs between a Union type or a wrapper Class to represent a formatted string argument representing multiple types
Ignoring some of these implementation details, the advantage of the second approach is the ease with which a BazId can be added.
Of course none of that matters unless Id's being different types ...
0
votes
Should i implement same interface in derived class?
If the parent class and the derived class implement the same interface then maybe there is a situation where the derived class might want to code an interface method differently to how it is coded in ...
Top 50 recent answers are included
Related Tags
interfaces × 688c# × 144
object-oriented × 143
java × 142
design × 101
design-patterns × 90
object-oriented-design × 68
inheritance × 66
c++ × 49
abstract-class × 42
solid × 32
architecture × 26
dependency-injection × 23
php × 22
programming-practices × 18
abstraction × 17
polymorphism × 17
api-design × 16
generics × 16
implementations × 16
class × 15
.net × 14
api × 14
naming × 12
composition × 12