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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:32:39+00:00 2026-06-07T02:32:39+00:00

I understand the concept of interfaces, however I often find it difficult to find

  • 0

I understand the concept of interfaces, however I often find it difficult to find practical examples of how to use them. I have produced the following code:

Public MustInherit Class Deletion2
    Implements DeletionInterface2

    Public MustOverride Function Delete() As String Implements DeletionInterface2.Delete
    Public Function CheckDate() As Boolean Implements DeletionInterface2.CheckDate
        Return True
    End Function
End Class

Public Class System1Delete
    Inherits Deletion2
    Implements DeletionInterface2
    Overrides Function Delete() As String
        Return "System 1 Deleted"
    End Function

End Class

Public Class System2Delete
    Inherits Deletion2
    Implements DeletionInterface2
    Overrides Function Delete() As String
        Return "System 2 Deleted"
    End Function

End Class

Public Interface DeletionInterface2
    Function CheckDate() As Boolean
    Function Delete() As String
End Interface

Public Class Form1

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim IDeletion As DeletionInterface2
        IDeletion = New System1Delete
        IDeletion.CheckDate()
        IDeletion.Delete()
        IDeletion = Nothing

        IDeletion = New System2Delete
        IDeletion.CheckDate()
        IDeletion.Delete()
        IDeletion = Nothing
End Sub

In the example above (in page load) I have used a reference to an interface to create an instance of an object, but I do not understand the true benefit of this.

  • 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-06-07T02:32:41+00:00Added an answer on June 7, 2026 at 2:32 am

    The benefit of using an abstraction like an interface (or a MustInherit class) is that you can treat any object that implements the interface the same exact way.

    For example, the System.Data namespace uses many such abstraction, meaning that implementing the different data providers is easier and since the core is using these abstractions, it doesn’t need to change as new implementations are added (things about all the different providers, built in and third party – SQL Server, Oracle, PostGresSQL, MySQL etc…).

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

Sidebar

Related Questions

I understand the concept and reasons behind using the using statement, and I use
I can't really understand this concept. Assuming i have this interface: public interface IValidate
Trying to use PureMVC framework and understand MVC concept. Don't understand this sentence: The
I have studied in php oop and stocked in the concept of reusable code.
I understand the concept of variable scope in the following example, but can someone
I am trying to understand the concept of currying and calling a function which
I am trying to understand the concept of timestamps in request headers in web
I'm trying to better understand the concept of 'autocommit' when working with a Postgres
What's the concept behind zip compression? I can understand the concept of removing empty
I'm a beginner in C and I'm trying to understand the concept of pointer

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.