Hello, this is my first attempt to answer a codeproject question. I would have liked to add pictures, but I will try to guide you the best I can.
In Visual Studio (I am using VS2010), Right Click on your C++ project and select the Properties menu item. Under Configuration Properties add Common Language Runtime Support by selecting Common Language Runtime Support(/clr) from the Common Language Runtime Support dropdown. Under Common Properties there is an "Add New Reference" button. Press this button and select the C# or F# project you would like to use.
In your C++ code add the following line
using namespace <the namespace of your .net project>;
using namespace TestLib;
I declared a static function in my Test class, so my call looks like
If you would like to call a member function you can use the following:
Test^ test = gcnew Test;