VB class: vbUtil (projUtilVB.vb)
Public Class vbUtil
Public Shared Function displayMessageBox(ByVal msg As String) As Integer
Return MsgBox(msg.ToString())
End Function
End Class
I've tested this little function in the code-behind of an aspx page to make sure it works properly, albeit a little ugly:
vbUtil.displayMessageBox("I work!")

For part 2 of this project, I made an asp.net web app on C#. I then added a reference to the DLL created from building the VB class found in bin -> debug -> projUtilVB.dll.
using System;
using ProjUtilVB;
namespace PhentrakCS
{
public static class projUtil
{
public static void testc()
{
vbUtil.displayMessageBox("hi");
}
}
}
The error I get is:
'ProjUtilVB.vbUtil' does not contain a definition for 'displayMessageBox'
I know I've used funny names, but it's half a test, half a side project i'm working on. Somewhere along the line there's a disconnect. It can clearly see the file, it can even see the class within the file, but it can't seem to hit that function.
UPDATE:
I rebuilt the solution and tried it again, and now it works. I can't explain it. Thanks to anyone who read it.
This post has been edited by atraub: 03 August 2010 - 07:34 PM

New Topic/Question
Reply




MultiQuote





|