Interview Question in Visual Studio 2005
Interview Question :: Creating a reference in visual studio 2005 VB |
I’m trying to get a reference to work. I made a library:
Class1.vb:
Namespace myNamespace
Public Class SimpleTest
Public Shared Function GetInfo(ByVal param As String) As String
Return "You invoked SimpleTest.GetInfo() with '" & param & "'"
End Function
End Class
End Namespace
and compiled it into a dll.
I created a website and created a reference to the dll in Visual Studio 2005. ClassLibrary1.dll, ClassLibrary1.pdb and ClassLibrary1.xml were copied into the Bin directory.
Here’s the code behind the page
Imports myNamespace
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = SimpleTest.GetInfo("Hi")
End Sub
End Class
myNamespace and SimpleTest.GetInfo() cause errors. |
|
|
|

Loading ...