In general, this is really complicated because C ++ offers different functions than C #: templates, friends, null-terminated strings, unmanaged pointers, COM, etc. not to mention that C ++ parsing is a bitch of work.
To do this, you need a complete C ++ analyzer with name and type resolution, a set of ideas on how to convert each construct (problematic or not) into equivalent C # code, a way to encode these ideas into automated translation steps, and a plan on what to do with those parts of the code that don’t translate well (usually “fix it manually”).
Using the DMS Software Reengineering Toolkit , which provides all the necessary mechanisms, my company, Semantic Designs, actually built such a tool, but never used it, for a large client who wanted to move 800K SLOC C ++ to C #. Approximately 2/3 of the project’s implementation, the client had a rearrangement in the management of the bird cage, and the new managers decided not to continue saving money (the tool itself was done well).