Overload visibility

I have "TestClass" with five overloads (see below). I also have "ChildClass":

Public Class ChildClass
    Inherits ClassTest

    'this version of overload includes four arguments: k, l, m,  and n
    Public Overloads Function FindProduct(ByVal k As Single, ByVal l As Single, _
                                                ByVal m As Single, ByVal n As Single) As Single
        Return K * l * n * m
    End Function

From a form, I cannot see the overloads from the base class.

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim c As New ChildClass
        MessageBox.Show((c.FindProduct(CDbl(TextBox1.Text), CDbl(TextBox2.Text))).ToString)
    End Sub
End Class

Q1: Is there a way for me to see the overloads from the base class (ClassTest)?

When I the code to "Dim c As New TestClass", c. intelisense shows the first overload and says +5 more overloads.

Q2: How can I access the 5 other overloads? I want to see what kind of signiture each has.

Thank you,
Public Class TestClass

    Private mFName As String
    'this is the original function
    Public Overloads Function FindProduct(ByVal n As Integer, ByVal m As Integer) As Integer
        Return n * m
    End Function

    'in this overload the data type for n is changed to single:
    Public Overloads Function FindProduct(ByVal n As Single, ByVal m As Integer) As Integer
        Return n * m
    End Function

    'same as above except the order of n and m
    Public Overloads Function FindProduct(ByVal m As Integer, ByVal n As Single) As Integer
        Return n * m
    End Function

    'here n and m are changed to double
    Public Overloads Function FindProduct(ByVal n As Double, ByVal m As Double) As Double
        Return n * m
    End Function

    'n and m as single
    Public Overloads Function FindProduct(ByVal n As Single, ByVal m As Single) As Single
        Return n * m
    End Function

    'here there are three arguemnts: l, n,  and m 
    Public Overloads Function FindProduct(ByVal l As Single, ByVal n As Single, ByVal m As Single) As Single
        Return l * n * m
    End Function

End Class

Open in new window

LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
 
lluddenCommented:
You need to inherit Testclass not classtest.

If you just assign a variable to testclass, you can see all of the overloads in it
0
 
lluddenCommented:
There should be a little drop down arrow next to the other overloads, or you can use the up/down arrows to scroll through them.
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
lludden,

I will try and get back to you. This was regarding question 2. Do you have any feedback on question 1?

thx,

Mike
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Sorry, there is no drop down arrow. Also up/down arrow doesn't bring up the remaining 5 overloads.
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
lludden,

Thanks, that answeres question 1.

do you know how can I see the other overloads?

Mike
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
I see, after I selected the routine name, the arwo up/down showed up.

thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.