Articles → .NET → Using Multiple Programming Language In An ASP.Net Project

Using Multiple Programming Language In An ASP.Net Project










Error While Adding The Files In A Single Folder









Solution








Picture showing a c# and a vb.net file in the same 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