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 |
hello friends.. when i deployment my project in the client machine that is successful but whenever i try to run my project using .exe file then it gives me error "<filename>.exe is not a valid win32 application." what i do somebody halp me pls
What is the difference between compiler and interpreter?
What is the difference between Namespace and Assembly?
What is a static class?
Explain about Visual basic.NET culture?
How to create a constant in vb.net?
What is globalization?
what are the types of threading models in VB.net ?
How do you use two datareaders at the same time in a vb.net windows application ?
what r the properties should be given to set method?
What is the relation between Garbage collector and finalize and destructor?
What are Major Feature of VB.NET Over C#.NET