Good morning,
Can someone help me to figure out how if I should used a Public Sub New or a Public Function. My codes are:
Public Function ClassAverage(ByVal Average As String)
Dim Grades() As Decimal = {76.5D, 63.4D, 45.4D, 94.5D, 81.3D, 66.2D, 68.6D}
Dim sum As Decimal = 0
For intCounter As Integer = 0 To Grades.Length - 1
sum += Grades(intCounter)
Next
Average = (sum / Grades.Length)
Return Average
End Function