G
Gary Morris
Hello all,
I've thought about this for a while, but can't seem
to find any examples OR explanations, so I'm just
gonna throw it out there.
I know that .NET allows for the use of multiple
programming languages, and I know all about how
to, say, write a .dll in C# and then use it in a VB.NET
application by referencing it in the project (or from
the command line compiler). What I am wondering
is, is there a way to use multiple languages and then
compile them all into the same assembly as
embedded entities?
Say I had two programmers working on a project.
One is good with C# and the other just cannot get
C# at all and insists on using VB. Once the two have
written their respective classes, etc., and the project
is ready to be compiled, can everything be put into
one assembly WITHOUT referencing anything?
After looking around, I have not come across
anything that looks like it will work, or maybe I am
just missing it altogether. If this is not clear, here is
what I mean:
I have One.cs and Two.cs
Now, I can just use "csc One.cs Two.cs" and make
one assembly that does not necessarily rely on any
other assembly (except normal System.* and such).
What if I have One.cs and Two.vb? Is there any way
to compile these two together like the above?
The only way I can think of is to give the two the same
namespace, compile both with their respective
compiler, and then use ILDASM to dump them both.
After that, I could just ILASM the two together and I
have actually done that. I'm just hoping that this is
not the only way. Surely MS didn't do THAT to us, did
they?
I've thought about this for a while, but can't seem
to find any examples OR explanations, so I'm just
gonna throw it out there.
I know that .NET allows for the use of multiple
programming languages, and I know all about how
to, say, write a .dll in C# and then use it in a VB.NET
application by referencing it in the project (or from
the command line compiler). What I am wondering
is, is there a way to use multiple languages and then
compile them all into the same assembly as
embedded entities?
Say I had two programmers working on a project.
One is good with C# and the other just cannot get
C# at all and insists on using VB. Once the two have
written their respective classes, etc., and the project
is ready to be compiled, can everything be put into
one assembly WITHOUT referencing anything?
After looking around, I have not come across
anything that looks like it will work, or maybe I am
just missing it altogether. If this is not clear, here is
what I mean:
I have One.cs and Two.cs
Now, I can just use "csc One.cs Two.cs" and make
one assembly that does not necessarily rely on any
other assembly (except normal System.* and such).
What if I have One.cs and Two.vb? Is there any way
to compile these two together like the above?
The only way I can think of is to give the two the same
namespace, compile both with their respective
compiler, and then use ILDASM to dump them both.
After that, I could just ILASM the two together and I
have actually done that. I'm just hoping that this is
not the only way. Surely MS didn't do THAT to us, did
they?