Articles → .NET → Using multiple programming language in an ASP.Net project

Using multiple programming language in an ASP.Net

project




Introduction









Error while adding the files in a single folder









Solution









Click to Enlarge




vbClass.vb


Imports Microsoft.VisualBasic

Public Class vbClass
    Public Function A() As String
        Return "vb code"
    End Function
End Class



csharpClass.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for csharpClass
/// </summary>
public class csharpClass {
  public csharpClass() {
    //
    // TODO: Add constructor logic here
    //
  }
  public string A() {
    return "C# code";
  }
}




<codeSubDirectories>
	<add directoryName="csharpcode"/>
	<add directoryName="vbcode"/>
</codeSubDirectories>




vbClass obj1 = new vbClass();
Response.Write(obj1.A());

csharpClass obj2 = new csharpClass();
Response.Write(obj2.A());







Conclusion





Posted By  -  Karan Gupta
 
Posted On  -  Thursday, December 1, 2011

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250