Interface implementation Diferences
- by carlos
What is the diference of using interfaces like ...
I have an interface
Public Interface IProDataSource
Function read() As Integer
End Interface
Then a class
Public Class DataSource : Implements IProDataSource
Function read() As Integer Implements IProDataSource.read
some code...
End Function
End Class
Then I use this the next way ... but what is the difference? ... boths approaches are working ...
Dim obj As IProDataSource = New DataSource
obj.read()
vs
Dim datas as new Datasource
datas.read()
The only difference I have notice is that if the method is declare private it will be visible using the first approach only.
Thanks for any comments !!!