Depending on Functions Instead of Interfaces

added by Paul Wheeler
4/3/2018 1:50:12 PM

1 Kicks, 245 Views

Here's a simple, contrived example of a class that depends on an interface, IDoesMath, followed by the same class modified to depend on a function instead. As you'll quickly see, there is no immediate benefit. The change doesn't make this a better class. So are there any benefits to depending on functions rather than interfaces?


0 comments