Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on 

Does use of an Interface (versus an object) force duplicate code?

I need to code an interface which will provide the ability for classes which inherit from it, a standard way to call certain functions.  But what if three our of five objects ned the exact same code when overriding one method call?  Isn't there a way to avoid this?

Is there anything lost, in terms of future flexibility, by creating a class that goes between the interface and the objects, which has the standard function call, which the three can then inherit from?

I'm new to using an interface as part of the object paradym.

Thanks for you help,
newbieweb
.NET ProgrammingASP.NET

Avatar of undefined
Last Comment
curiouswebster
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of curiouswebster

ASKER

thanks.
newbiweb
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo