Parameter and Default Value Must be of the Same Type Error

You used a value of an incorrect data type as a default value. When you create a method in the Add Method declaration area, you can optionally set a default value for each of the parameters.

Of course, the data type of the default value must match the data type of the parameter.


Example

Consider the following parameter declaration:

s as String = 15

Since s is declared as a String, its default value must be a String. 15 isn't.