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

Did vb6 support multi-threading ?

907


What is the difference between value and reference types?

999


how many server control present in .net

2699


Explain trace in vb.net?

916


What’s the difference between private and shared assembly?

1063


What are the technology areas that microsoft.net contains?

952


Is vb.net dead?

910


Explain some of the exclusive features which are present in vb?

864


Explain how does the xmlserializer work?

979


Explain the differences between vb.net and c#, related to oops concepts?

888


Can you please explain the difference between dispose and finalize()?

942


What is the use of system.diagnostics.process class?

987


Which namespace are used for accessing the data?

1136


How many ways the function can return values?

951


How can I extract the formated word(bold,italic,underline,font,color etc) from the msword file.?

965