how can get my evc++ code ported into to .net using visaul c#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i need to port my EVC++ code into .net2003 using Visaul c#. how can that be
done as lot many bugs come up if iam trying to do it.

regards

naveen
 
Well, maybe - maybe not. For the Wi32 code that is NOT specific to Windows
CE you can get a long way in the process by using the desktop managed C++
compiler to generate MSIL and reflector from Lutz Roedr
(http://www.aisto.com/roeder/dotnet/) to "reverse" that to C# code. However,
I'd be recommend you ask yourself the following questions before embarking
on a port from C++ to C#

1) Why do you want to do this?
2) What is the expected benefit of the translation?
3) Can you get those benefits by only converting some specific portion and
using P/Invoke for the rest? (E.g New UI in C# but core code in C++) [ CF
2.0 has COM interop support so you could do it that way as well ]

Conversion from C++ to C# is more of a re-write than a conversion so unless
your application is trivial it's usually not worth it to try to convert.
It's usually better to start over and occasionally steal code snippets from
the C++ (Since C# syntax is based on that of C++ at the basic expression and
statement level it's reasonable to re-use some of the code with the copy -
paste - tweak technique)
 
Agreed. Even if there were a converter, there would still be a huge "should
I?" question looming. I'd advocate migrating if you intend to do further
work and enhancements, and even then I'd likely only convert UI. If you
have working C++, there's got to be a huge business advantage to doing the
port for the effort to pay off in any way. Doing it just for the sake of
doing it is probably not a good idea.

-Chris
 
Back
Top