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#?

You can import with P/Invoke
http://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx
or you can write it in "managed" C++
http://msdn.microsoft.com/en-us/library/aa712574(VS.71).aspx
also, this question comes up a lot at
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/threads
(this is one of their niche issues).
And no doubt there's lots of folks lurking here that may know a thing or two about it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.