how to exchange values between severaly projects types ?
Hi every body ; i created a new soluation and add a new Console project using vc like this :
class r
{
int x,y;
r()
{
x=4;y=5;
}
}
int main()
{
}
then i created anew windows application project using c# in the same soluation ; my question is how to create instance of this class created in vc project to use them in c# application ; thanks
You cannot directly add c++ files to a C# application (that I am aware of). Instead, you can make a dll from your c++ files and then call the dll in C#. If you need more details on the process of either making the dll or calling it in C#, just say the word.
You will either need to declare the new class in the new project's main .cs file and refer to it by [Namespace].[Class_name]. Or you could simply include the .cs file from your other project. Be sure to comment out the main function as you can't have multiple entry points in one application.
Make sure you reference the namespace if they are different.
0
raed2003Author Commented:
how to include cpp file in c# windows application !!! ; also i tried namespace.classname but it doesn,t work ....