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 / satishdubey

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 ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is late binding and early binding?

1047


What are the parts of the visual basic control?

934


Explain about branching logic control in vb.net?

916


Explain about the performance of visual basic?

1012


What is enumerator?

983


Why is the xml infoset specification different from the xml dom?

904


Explain namespace?

1084


i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?

2645


What is the difference between static or dynamic assemblies?

994


Why do you need Lock in Visual Basic?

1075


Explain and brief about rapid application development tool?

997


What are the shared variables?

1017


What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?

958


Name a feature which is common to all .net languages?

993


What is strong typing and weak typing?

979