tags:

views:

113

answers:

2

Hi to everybody!!

I'm kind a newbie in .net stuff, however I'm developing a same project in two languages, C++ and C#; nothing too complicated, just a couple of classes in each project that basically do the same.

Now, I need to make a single test project for both sets of code, so my question is how can I make a project, most likely a console project, in which I can include the c# classes along with the c++ classes.

When I run the console project I want to be able to do something like:

  • C# /s {methodname} | /i {parameter}
  • C++ /s {methodname} | /i {parameter}

I hope you can understand what I mean.

A: 

Since it's .NET, can't you just add a reference and a using statement, then have a "/cpp" or "/csharp" option?

Lucas Jones
+1  A: 

As long as the C++ is fully managed, you can call it from another .NET assembly written in any language.

For testing however, I would recommend going with a test framework like NUnit or MbUnit instead of writing your own in a console application. They will provide you with a much more robust testing environment.

Rob Prouse
The code is completely unmanaged, it is a simple atl project so I should probably not be able to call it from .net assembly. I think that may be a good idea to follow your advise and use another framework like those you mentioned.I'm going to try that and see what happens, thanks!
Vic