Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between a sub and a function?

Answer Posted / m.sivakumar

A Sub Procedure is a method will not return a value
A sub procedure will be defined with a Sub keyword
Sub ShowName(ByVal myName As String)
Console.WriteLine (My name is: & myName)
End Sub

A function is a method that will return value(s).
A function will be defined with a Function keyword
Function FindSum(ByVal num1 As Integer, ByVal num2 As Integer)
As Integer
Dim sum As Integer = num1 + num2
Return sum
End Function

Is This Answer Correct ?    21 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the two main parts of .net?

990


Can you please explain the difference between int and int32?

1152


What is early binding?

996


What is the importance of a Button control?

1352


What is the exact defination of object?

1072


what is interface and when it is used?

2326


Explain an assembly and its use?

1073


Explain the difference between thread and process?

1064


What are different types of jit ?

1118


What are option strict and option explicit?

1422


How many classes a dll can contain?

1029


What is different between web.config and machine.config and where it will be ?

1067


Explain trace in vb.net?

1032


What are the advantages of VB.NET?

1073


What are the advantages of an assembly?

1124