Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i know that i can compose different .net language in visual studio but how?
we have a project that contain C++ CLR ( managed C++ ) and C# forms .
how we compose this forms? and how we compose different .net languages code?
tanks
Posted

1 solution

You can mix assemblies that use different languages, but you can't use two different languages in the same .Net assembly. So, if you have some forms written in C#, put those forms into their own project (a class library), and the same thing goes for C++, and VB.

Like I said, you can add a reference in your project to ANY .Net assembly, and this even includes other executables.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 23-Mar-11 10:08am    
Good answer! 5+
Proposed as solution.
Wendelius 23-Mar-11 10:09am    
Well explained, 5.
flikeforghon 23-Mar-11 15:29pm    
do i see true ?
we must create two project ( one for C++ and one for C# ) and define forms and classes . then add classes to main project and run forms from that ??
#realJSOP 23-Mar-11 15:44pm    
Yes. There's no way around it unless you want to refactor one of the projects to use the same language as the other. Why did you accept my answer and then unaccept it. It may not be the answer you wanted, but it *is* the answer.
flikeforghon 23-Mar-11 15:53pm    
i am so sorry for my clumsily question!
but how can i call a class that define in another project ? i tried very much but i can't find it!
tanks a lot for your answers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900