Combining code portions from different Laguages

  • Thread starter Thread starter pontifikas
  • Start date Start date
P

pontifikas

How difficult is it to have a project which contains portions of, say,
C# and C++(or VB)? Can this be done? What are the general rules for
doing such thing?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
Well it depends if you are using Visual Studio .NET or not.

If you are, then you can create a solution with multiple projects, each of
which is written in a separate source code language. Each project will build
a distinct .NET assembly (either a .dll or .exe). Once you've created a dll
project, then it can be added as a reference to a different project - in the
next version of VS.NET, you will be able to do this with exe projects.

With the command line compilers, you can create modules in separate
languages, and combine these into a single assembly. Both dll and exe outputs
can be used as libraries in this case - you don't have to create a dll to
reuse the types contained inside it.

Under the surface of course, you will be creating IL from either language.

As for recommendations, it depends on your own and your team's aptitudes....

HTH

Nigel Armstrong
 
Back
Top