July 2015
Intermediate to advanced
1300 pages
87h 27m
English
One of the most powerful features when working with interfaces is that methods can receive interfaces as parameters. This means that you can pass in any object as these parameters so long as it implements the given interface. The following example shows a method that accepts an argument of type IList, meaning that any object implementing the IList interface can be accepted:
'Interfaces as parametersPublic Class WorkWithLists Public Function Elaborate(items As IList) As Integer 'Just for demo, returns 0 if the list contains something If items.Count > 0 Then Return 0 Else 'if not, adds a new object to the list Dim item As ...
Read now
Unlock full access