• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 953
  • Last Modified:

Convert Visual C++.NET to C# ?

I copied some code in C++ and compiled it using Microsoft's Visual Studio 2003, and I was wondering how difficult it would be to convert the project to C# ?
0
thunderchicken
Asked:
thunderchicken
  • 5
  • 5
  • 3
  • +2
3 Solutions
 
iboutchkineCommented:
try Lutz Roeder Reflector
Reflector is a class browser for .NET components. It supports assembly and namespace views, type and
member search, C# XML documentation viewer, call and callee graphs, IL, VB and C# disassembler,
dependency trees, base type and derived type hierarchies and resource viewers. C#, Visual Basic and
Delphi language syntax is supported.

http://www.aisto.com/roeder/DotNet/


You can open your assembly in C++ and then convert it to C#
0
 
Bob LearnedCommented:
Difficult ;)

Bob
0
 
AlexFMCommented:
You can wrap this code to C++/CLI library. Create C++/CLI Class Library, add class to it which exposes pure managed interface for C# client and internally calls legacy C++ code. There are no any restrictions on using unmanaged code in C++/CLI.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
thunderchickenAuthor Commented:
I guess I was hoping there was a magic tool, or MS conversion.  Doh!

It's pretty straight forward code anyway, so I'll just bite the bullet and do it manually.

Thanks
0
 
Bob LearnedCommented:
If you look up ^^^, there's an expert (AlexFM) who can really help you with the conversion, if you want. ;)

Bob
0
 
thunderchickenAuthor Commented:
Yea, I saw that, have it working, etc, but I was trying to avoid doing it that way.  The goal was to have everything together, instead of compiling seperate .dll's  :(
0
 
Bob LearnedCommented:
Can we see the C++ code, please?

Bob
0
 
thunderchickenAuthor Commented:
http://home.comcast.net/~tckerrigan/

It's basically this, but I've been modifying it over the past few weeks, but this is the meat and bones.  I was wanting to write my own from scratch, but curious how the C++ specific things would transfer to C#.NET, or even crappy VB.NET
0
 
Bob LearnedCommented:
The interesting thing that I have discovered is that C# 2005 can include C++ code without conversion.  I find that interesting to know.

Bob
0
 
thunderchickenAuthor Commented:
Well, this was the easiest example i could find to actually learn how to write my own chess engine.  This would just save me time to have it converted, but I'll learn much more by doing this line by line.  No big deal, that's what work lunch hours are for.
0
 
Bob LearnedCommented:
Well, my friend, if you need help, let us know.

Bob
0
 
anwar ul haqueCommented:
I think you are looking some tool to convert c++ syntax into c#, that is not available, I'm afradid you will have to do it manually.
0
 
anwar ul haqueCommented:
look at the accepted answer.....:D no wonder ppl will laugh ;)
0
 
thunderchickenAuthor Commented:
It was the best answer that summed up my 14 days of conversion.
0
 
anwar ul haqueCommented:
actually I'm NOT against your judgement but if you look at the visually accepted answer you will laugh.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 5
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now