Best way to reverse engineer C# batch process RRS feed

  • Question

  • Hello,

    I have to reverse engineer some C# code. This process is a batch process, that simply moves data around. I am relatively new to C#, so this is really a challenge. I have tried stepping through the code, but that takes forever since there is a lot of data.

    What do you guys recommend?


    Friday, March 23, 2018 5:27 PM

All replies

  • What exactly do you need to "reverse engineer" ... because, when you say you've stepped through the code, that doesn't tell me much about what your problems is. Generally speaking, reverse engineering (as defined in this Wikipedia article, ) means"the process of analyzing a subject system to identify the system's components and their interrelationships and to create representations of the system in another form or at a higher level of abstraction".

    So are you looking at the code in order to create a new version in another form (like in a different programming language, for example)?

    I think you need to better define what you're trying to accomplish, because it's not clear from your question ... unless, I'm having "one of those days" and I'm just not thinking straight ...  ;0)  


    ~~Bonnie DeWitt [C# MVP]

    Saturday, March 24, 2018 1:37 AM
  • The term "reverse engineer" is usually used in the manner to refer to the process of looking at the compiled code and attempting to re-create the source code. I have never seen the term used to refer to a process involving just the source code. I think you are saying you want to understand the code but you don't want to say that directly. Unfortunately there are no easy answers unless you have money to spend.

    I recommend learning C#.

    Sam Hobbs

    Saturday, March 24, 2018 4:18 AM
  • Thanks for your responses.

    I have to optimize the performance on an application that has C# as the front end and SQL on the back end. I suppose I am asking for guidance on how to get started if you are brand new to C#. The SQL side I have no issues with. It's just understanding what the heck is going on in the C# code.


    Wednesday, March 28, 2018 9:14 PM
  • Hi Dave,

    You could post some of your C# code, but of course the hard part is deciding what needs to be posted (we don't want to see everything!). Do you at least have an idea of what part might be slow? Post that ...

    BTW, use the "Insert Code Block" button for that, the 2nd button from the right ...

    ~~Bonnie DeWitt [C# MVP]

    Wednesday, March 28, 2018 9:19 PM
  • It sounds like you are new to all programming languages. That is different from being new to a language; if someone is familiar with at least one language then they are more likely to be able to get an idea of how things work in another language.

    The first thing to do is to determine what type of UI the program is using. It might be a console program or it might be Windows Forms or WPF.

    Do you know what the Solution Explorer is? Can you find it? Do you understand what we mean by "project"? Look at the project; does it have any files of file type "XAML"? If not then there is probably a file called "Program.cs". Does it look something like the following?

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace csForm
        static class Program
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            static void Main()
                Application.Run(new Form1());

    Sam Hobbs

    Wednesday, March 28, 2018 10:52 PM