In VB .net, there are two types of methods: functions and subroutines.
Subroutine Declarations:
- Sub method-name(parameter-list)
-
declarations and statements
-
End Sub
Function Declarations:
- Function method-name(parameter-list) As return-type
-
declarations and statements
-
....
-
return expression
-
End Function
So again, function is a method type that you can use to return values, where sub routines does not return a value. In fact, as you can see, a function or subroutine in Vb.net are both methods.
Example of a shared function in the FCL framework:
- dim quad as integer = math.pow(2,4)
That will make, of course, quad = 16.
Hope that helped!