Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 545807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:48:03+00:00 2026-05-13T10:48:03+00:00

Quirky question: Imagine that I have a base class called BaseFoo. I have an

  • 0

Quirky question:

Imagine that I have a base class called BaseFoo. I have an interface with some methods called IFoo. And I have tons of classes beneath BaseFoo.

If i implement the interface in BaseFoo, i dont need to implement in the inherited classes, correct?

Ok, but imagine that i have a generic function that will treat IFoo’s. Do i need to explicitely declare that they implement IFoo?

Like this (pseudo-illustrational-code)

public class BaseFoo:IFoo;

public interface IFoo;

Should i do this?

public class AmbarFoo:BaseFoo,IFoo

or?

public class AmbarFoo:BaseFoo

What is the most correct way? Are the effects the same? If i test if AmbarFoo is a IFoo what will I get?

Thanks

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:48:03+00:00Added an answer on May 13, 2026 at 10:48 am

    It will behave the same way regardless. You’d only need to restate the interface name if you wanted to reimplement the interface with explicit interface implementation. An instance of AmbarFoo will indeed “say” that it implements IFoo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm seeing some quirky behaviour with Cocoa's KVC/KVO and bindings. I have an NSArrayController
It's actually two part question regarding my simple page (that will be replaced some
Hi all SQL Server Blackbelt masters out there. I have a simple question that
Here's an interesting question about the various quirks of the C++ language. I have
I just have a quick question about IE8 Standards mode vs Quirks mode. The
(this is related to this other question ) If you define an Interface where
This is a follow up question to that at Can I create a HTML
Today I was assigned a bug saying that some page elements don't work on
Some time ago we took over the responsibility of a legacy code base. One
My question pertains to possible issues that I may encounter if I upgrade to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.