views:

306

answers:

1

Is it possible to link C# and Visual C++ projects under 1 solution?

How can I do this?

I hav created a class in c# which contains two methods display() and ListSql().

And how to use these methods of c# project in vc++ project.which type of project i need to

create to do this.

I do like following

I have created a classlibrary which contains a Test class in that Display() and ListSql()

and i have a refence to c# project from vc++ project.

and i have writen as. i didnt write any import statement

using namespace Test;

void main() {

}

// error namespace Test doesnot exist like wise error

+3  A: 

If you are asking whether you can have two projects with different languages in the same solution, then yes. Just right click on the solution and add the project.

From that point you would need to add a reference from one project to the other.

Project -> Add Reference

JTA