ParamArray means to allow a subrotine to take a variable no. of arguments.
I m just sending the arguments suppose i send 1,2,3,4,5
I want just the addition of these numbers.
Sub main()
Dim i As Integer
i = Console.ReadLine()
average(i)
Console.ReadLine()
End Sub
Sub average(ByVal ParamArray b() As Integer)
Dim total As Integer = 0
For i As Integer = LBound(b) To UBound(b)
total = total + b(i)
Next
Console.WriteLine(total.ToString)
End Sub
I m not understanding what is wrong in the program,y the o/p is not coming which is intended.
plz go thru it & do reply back.