I am thinking of learning C++ (I already know Python and Java), and a friend of mine is thinking of learning C# (already knows some Java and JavaScript).

I know there is a long debated "C++ or C#" ordeal out there, so I am not asking about that! :) (I've already done my research on that subject).

What I would like to know is: If him and I decided to team up on a project, can we program in our own languages and use them together? Maybe with dlls or byte code (or I guess in this case MSIL)?

And if so, what tool(s) would we need and how would it be done?

Thanks in advance!

- WolfShield

6 Years
Discussion Span
Last Post by WolfShield

C++/CLI and C# are assembly compatible. You can write an assembly in one language and reference it from the other because they're both CLR-based languages. C# can also reference native C++, but it's not as simple as referencing an assembly because the native C++ DLL would be outside of the CLR framework.



Also I was wondering, how would using both languages change the performance, if at all?

How would a program made with C++ and C# compare to a program made JUST in C++ or JUST in C#?

Thanks again!

- WolfShield

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.