answersLogoWhite

0

Sub Procedures are the methods that do not return any value. An example would be: -

Sub Main()

PrintMyName())

End Sub

Sub PrintMyName()

System.Console.WriteLine("My Name is Sam")

End Sub

Functions are the methods that return a value. For example: -

Sub Main()

Dim i,j as Integer
i=10
j=20
System.Console.WriteLine("10 + 20 = " PrintSum())

End Sub

Public Function PrintSum(i as Integer, j as integer) As Integer

Return(i + j)

End Function

User Avatar

Wiki User

15y ago

What else can I help you with?