Namespace wfgSpace
Public Interface IMyShow
Sub Show()
Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
End Interface
Public Interface IMyShow2
Sub Show()
Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
End Interface
Public Class MyCls : Implements IMyShow, IMyShow2
Private iValue As Integer
Sub Show() Implements IMyShow.Show
System.Console.Write("wfng fu guo")
End Sub
Sub Show2() Implements IMyShow2.Show
System.Console.Write("wfg")
End Sub
Function Add2(ByVal a As Integer, ByVal b As Integer) As Integer Implements IMyShow.Add, IMyShow2.Add
iValue = a + b
System.Console.WriteLine("{0}+{1}={2}", a, b, iValue)
End Function
End Class
Public Class Common
Public Shared Sub main()
Dim obj As MyCls = New MyCls
Dim obj2 As IMyShow = New MyCls
Dim obj3 As IMyShow2 = New MyCls
System.Console.WriteLine("Class MyCls Object")
obj.Show2()
obj.Add2(5, 4)