Accessing VB.Net class in App_Code from C# code behind

Last Reply one year ago By pandeyism

Posted one year ago


 In my App_Code I have made class file in .vb. Now need to access that file class in c# code behind. 

The class file is inaccessible in c# code behind file.

How should I do that.

Posted one year ago

Hi Sumeet,

Please refer below sample.

Vb class can  access in C# code behind, refer below sample.


protected void Page_Load(object sender, EventArgs e)
    Customer cust = new Customer();
    Response.Write("Name is: " + cust.GetFirstName() + " " + cust.GetLastName());


Public Function GetFirstName() As String
    Return "Mudassar"
End Function

Public Function GetLastName() As String
    Return "Khan"
End Function


Name is: Mudassar Khan