• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 50
  • Last Modified:

Dll Function is not appearing in vb 2015 project

Using VS 2015 on Server 2012 R2

---------------------------------------------
DLL Code is

Public Class SalDll
    Class SubClass1
        Function AddingNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer)
            Return (Number1 + Number2)
        End Function
    End Class
End Class

---------------------------------------------
Project Code is

Imports Test1.SalDll
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        SubClass1.(the problem is here)
    End Sub
End Class

---------------------------------------------
The problem is
By typing (Imports Test1.) then (SalDll) appears and I can select
By typing (SubClass1.) then (AddingNumbers) is not appearing

Any Idea
0
saljas
Asked:
saljas
1 Solution
 
Ryan ChongCommented:
for your DLL Code function, try add Shared in front of your function:

Shared Function AddingNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer)
0
 
saljasAuthor Commented:
Very good        Many thanks it works with shared
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.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now