decompile assembly into project
Asked Answered
R

2

2

I will like to see the value of some private variables of the Regex class located on System.dll. If curious why I will like to twick that class look at this question.

So I will have to decompile C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll

I am able to decompile that with reflector:

enter image description here

Now my question is Is there a way of creating a solution of visual studio with all those classes. There are hundreds of classes in there and I do not want to go one by one placing them to my new project.

Rochellerochemont answered 30/7, 2012 at 17:59 Comment(4)
Don't go there. You can see private variable with the debugger. You can even get them out of the object by using Reflection.Piroshki
The problem is that the private variable _index get's set = 0 if the match fails. I will like to retrive it on the middle of the method. maybe I could do that from a different thread try to access it several times. that will be very unsafe lolRochellerochemont
This seems like a very roundabout way to get the maximum position of a decimal value in a string if a match fails. Surely there's a simpler way to look for it? Are you searching through gigabytes of text?Abingdon
Side note: decompiling assemblies with the goal to include resulting sources into your own project may have legal side effects. Check if you care.Ivonne
K
2

Both ILSpy and JustDecompile allow exporting to a Visual Studio project.

Kebab answered 30/7, 2012 at 18:41 Comment(0)
K
1

If you are wanting to create the whole project look at http://www.reflector.net/ it has a addin called FileDisassembler http://www.reflector.net/add-ins/ that will do just what you are looking for.

Kiser answered 30/7, 2012 at 18:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.