One Class implements two Interfaces which have the same name method : Interface « Class « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Class » InterfaceScreenshots 
One Class implements two Interfaces which have the same name method
One Class implements two Interfaces which have the same name method

Imports System
Imports System.Data
Imports System.Collections

public class MainClass
   Shared Sub Main()
        Dim As New Class1()
        Dim i2 As MySecondInterface
        c.CommonFunction()
        i2 = c
        i2.CommonFunction()
   End Sub
End Class


Interface MyFirstInterface
    Sub UniqueFunction()
    Sub CommonFunction()
End Interface

Interface MySecondInterface
    Sub SecondUniqueFunction()
    Sub CommonFunction()
End Interface

Public Class Class1
    Implements MyFirstInterface
    Implements MySecondInterface

    Sub UniqueFunction() Implements MyFirstInterface.UniqueFunction

    End Sub

    Sub SecondUniqueFunction() Implements MySecondInterface.SecondUniqueFunction

    End Sub

    Sub CommonFunction() Implements MyFirstInterface.CommonFunction
        Console.WriteLine("Common Function on first interface")
    End Sub

    Sub CommonFunctionSecondInterface() Implements MySecondInterface.CommonFunction
        Console.WriteLine("Common function on second interface")
    End Sub

End Class

           
       
Related examples in the same category
1.Interface inherits interfaceInterface inherits interface
2.Class implements two interfaces
3.Implements an InterfaceImplements an Interface
4.Implement an InterfaceImplement an Interface
5.Define and use Interface AgeDefine and use Interface Age
6.Interface Inherits another InterfaceInterface Inherits another Interface
7.Define and use InterfaceDefine and use Interface
8.Implements Two InterfacesImplements Two Interfaces
9.Generic Class and InterfaceGeneric Class and Interface
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.