Interfaces

I have recently fallen in love with interfaces – they make it so easy to distribute uniform changes across many objects… that is, until you want to add a member who's signature changes depending on which class inherits it

For example, I have two classes, Customers, and Events.  Both inherit my "CustomCollection" interface.  I want the interface to force the implementation of an Add method, but inevitably their arguments are different:  Add(Customer cust) , Add(Event ev). Is there a way to tell the interface that the parameters can change depending on the class?

 

 

 

Read More

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s