I have one piece of code that has to be written in C++, another has to be written in C#. So I decided that I will write a class in C++ that updates the information. Then is read by the C# application.

Would it be as simple as compiling all of the C++ code into a DLL and importing that into C#?