Difference between a sub and a function?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Explain i.tostring method?
Explain an assembly?
What are the features present in vb 2005?
Explain the use of option explicit?
What are the differences between server-side and client-side code?
What does assert() method do In VB.NET
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 ?
What is CLR?
20 Answers Horizon Computers, Microsoft,
Explain the difference between dispose and finalize()?
code for export,import,save,update,delete ?
Is VB.NET object oriented? What are the inheritances does VB.NET support ?
13 Answers Digital GlobalSoft, Global Infotech, Infosys,
is it possible to use flexgrid in vb dotnet?
9 Answers Banking, Microsoft, NetBIOS,