Thankful the designer of vb.net have taken the view that error messages should be descriptive and helpful.
Some of the even suggest a solution.
Let's take this error message and decipher it.
No overload for 'GetAverage' takes 0 arguments
Let decode the error message.
- No Overload ...
So what is an Overload?
An overload is method that has the same name as another method in your class/module but with different input signatures.
So I know know as something to do with one of the methods "GetAverage"
Further Reading: MSDN Article on Overloads in vb.net
- takes 0 arguments
So what is an argument?
Arguments are the values you provide for a method's input parameters.
Public Function Add(x As Integer, y As Integer) As Integer Return x + y End Function Dim z = Add(1,2)
Parameters: x y
Arguments: 1 2
So it must be something to the number of parameters I'm passing, or not passing.
Further Reading: MSDN Article on Parameters and Arguments
No Overload of the Method "GetAverage" has Zero number of Parameters, to take the Zero number of parameters I'm passing.
So that suggest I'm not providing enough arguments.
Don't understand the full error message, then break it up it chunks.
Research and understand each aspect and concepts.
That the debugging and analysis skills learn for programming, apply not only to programming! Use them.
Further Reading on MSDN
vb.net runtime error messages
vb.net compiler error messages
Visual Studio Error Messages
Edit: Correcting MSDN URL
This post has been edited by AdamSpeight2008: 19 October 2012 - 10:15 PM