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

  • Home
  • SEARCH
  • 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 7441689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:03:23+00:00 2026-05-29T11:03:23+00:00

There are two way for choosing between abstract class or interface. Microsoft solution and

  • 0

There are two way for choosing between abstract class or interface. Microsoft solution and Oracle solution:


Microsoft, design guideline:

Do use abstract (MustInherit in Visual Basic) classes instead of interfaces to decouple the contract from implementations.

http://msdn.microsoft.com/en-us/library/ms229013.aspx


Oracle, The Java Tutorials:

If an abstract class contains only abstract method declarations, it should be declared as an interface instead.

http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html


My question is which way is correct? Microsoft or Oracle solution? Note that I think choose between abstract class or interface should not depends on programming language (Java or C#).

  • 1 1 Answer
  • 0 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-29T11:03:24+00:00Added an answer on May 29, 2026 at 11:03 am

    If I recall my blog reading correctly, the Microsoft advice to use abstract classes stems from the ability to reuse implementation with an abstract class, something you can’t do with an interface.

    Note also that the Microsoft page you linked to is specifically guidance for writing code libraries for sharing/reuse across multiple projects. The likelihood in this situation is that you’ll be writing all the implementations of the interface yourself, probably within the same assembly. Good practices for working on a single product or system will vary somewhat.

    One common approach that I’ve seen across a number of codebases in a number of languages is this:

    • Define an interface to specify the contract
    • Create an abstract class implementing the contract to provide any common implementation useful to all descendants
    • Implementations of the contract then have the option to start from the base class for convenience, or just to implement the interface if they want full control

    A fourth step common in the .NET world is to provide convenience extension functions built on the interface.

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

Sidebar

Related Questions

We want to use Change Tracking to implement a two-way sync between a SQL
Is there a way to fire a two way data bind when the key
Are DES Encryption called "One Way Encryption" or "two way Encryption" ? Are there
Is there a way to merge two primary keys into one and then cascade
Is there any way to show two editing windows in Visual Studio? I would
Is there any way to make two controls that are in different containers the
Is there a way to create two dimensional NSArray without nesting arrays in the
Is there any way to have this: [one[two]][three] And extract this with a regex?
is there a way l can compare two columns | fields in django like
Is there a way in C# to merge two dictionaries? I have two dictionaries

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.