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 5934583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:08:03+00:00 2026-05-22T15:08:03+00:00

Implementing Interface just provide the skeleton of the method. If we know the exact

  • 0

Implementing Interface just provide the skeleton of the method. If we know the exact signature line of that method, in this case
what is the requirement to implement Interface?
This is the case in which Interface has been implemented

interface IMy
{
    void X();
}
public class My:IMy
{
    public void X()
    {
        Console.WriteLine("Interface is implemented");
    }
}

This is the case in which Interface has not been implemented

public class My
{
    public void X()
    {
        Console.WriteLine("No Interface is implemented ");
    }
}

My obj = new My();
obj.X();

Both the approaches will produce the same result.
what is the requirement to implement Interface?

  • 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-22T15:08:04+00:00Added an answer on May 22, 2026 at 3:08 pm

    There are two purposes of inheritance in .net:

    1. Allow derived classes to share the base-class implementations of common functionality
    2. Allow derived-class objects to be substituted for base-class objects anywhere the latter would be accepted.

    Unlike some languages (C++, for example) which allow multiple inheritance, .net requires every class to have precisely one parent type (Object, if nothing else). On the other hand, sometimes it’s useful to have a class be substitutable for a number of unrelated types. That’s where interfaces come in.

    An object which implements an interface is substitutable for an instance of that declared interface type. Even though objects may only inherit from one base type, they may implement an arbitrary number of interfaces. This thus allows some of the power of multiple inheritance, without the complications and drawbacks of full multiple-inheritance support.

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

Sidebar

Related Questions

I'm implementing a COM interface that should return int values either S_OK or E_FAIL
as I am implementing the ICollection-Interface in my class I want to implement the
When implementing the ISerializable interface in C#, we provide a constructor which takes a
I'm writing a method that forms part of the public interface of a Java
Currently I have my VaryByCustom functionality implemented in classes that implement an interface IOutputCacheVaryByCustom
I want to have an argument of type this class in an interface's method
In implementing an interface it seems the common method in tutorials and literature is
I have an Enterprise Application with an EJB implementing a @Remote business interface that
Whats the other option we can use for multiple inheritance other than implementing interface
Can Eclipse make parameters for generated methods (overwriting, implementing interface, etc.) final, and if

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.