We are planning to move few of our VC++ Legacy products to C# with .NET platform.. I am in the process of collecting the relavent information before making the proposal to give optimistic and effective approach to clients. Am looking for the following details.
Please help me in getting these information, each penny would help me to gain good understanding..
Thanks in advance to those who will share their wisdom thorough this query.
Often, my best advice is: Don't do it.
If you have functioning, clean C++ code, there is no reason to rewrite it. It is very easy to use C++/CLI to build wrappers around the legacy code to make it usable from C#/.NET.
This is often a better, quicker, and safer approach. You can then do your new development in .NET, and slowly migrate any existing code required if there is a real need to do so.
That being said, migrating code from C++ to C# is typically very much a complete, from scratch rewrite (unless you wrap as mentioned above). This is primarily because of the huge difference in libraries, not the difference in languages.
The .NET Framework provides a huge library of tools that can, and should, change the architecture of your code when written. If you just directly port the C++ to C#, you'll find that you'll be doing a lot of things in non-standard ways, and you'll end up with very difficult-to-maintain C# code.
My suggestion, based on my experience, is to wrap your code first. Then, if you decide you need to extend certain functionality, and it's unweildy because of the wrappers, you can rewrite that one specific portion of your code in C# using completely new techniques and libraries - and replace the C++ piece by piece.
One gotcha, if you have a complicated class hierarchy, note that C# doesn't support multiple inheritance, so you may have to rethink the structure of your program.
Edit: Another thing to keep in mind is that the .net framework is very, very big. You may find utility classes in your c++ code that can be completely replaced by standard library classes in c#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With