reflector

Scope and how to narrow it using VB.Net

孤街醉人 提交于 2019-12-01 03:43:37
问题 If I want to narrow scope of a variable in C#, I can introduce additional braces - i.e.: class Program { static void Main(string[] args) { myClass x = new myClass(); x.MyProperty = 1000; Console.WriteLine("x = " + x.MyProperty); { myClass y = new myClass(); y.MyProperty = 2000; Console.WriteLine("y = " + y.MyProperty); } myClass y2 = new myClass(); y2.MyProperty = 3000; Console.WriteLine("y2 = " + y2.MyProperty); } class myClass { public int MyProperty { get; set; } } } In the ide, I can no

How to get Visual Studio to step into third party assemblies

六眼飞鱼酱① 提交于 2019-11-30 18:23:56
When I'm debugging or even coding, it would be really uesful to examine third party assemblies but I can only see their metadata. Given that tools like reflector can decompile assemblies, is there someway or some tool which would allow visual studio to do the same thing? If I happen to have access to the PDB files for an assemblies, would placing them into my applications bin folder allow me to examine the assemblies content through visual studio? If you have PDB's for a DLL you can certainly examine the DLL while debugging. Make sure that you have "Just My Code Disabled" and you should be

How to get Visual Studio to step into third party assemblies

喜欢而已 提交于 2019-11-30 01:25:42
问题 When I'm debugging or even coding, it would be really uesful to examine third party assemblies but I can only see their metadata. Given that tools like reflector can decompile assemblies, is there someway or some tool which would allow visual studio to do the same thing? If I happen to have access to the PDB files for an assemblies, would placing them into my applications bin folder allow me to examine the assemblies content through visual studio? 回答1: If you have PDB's for a DLL you can

Where does delegates' constructors and member functions are defined?

为君一笑 提交于 2019-11-29 16:08:46
When I was looking at the Action delegates in Reflector, I saw it has a constructor like public Action(object @object, IntPtr method); But I could not find any body for the same along with other member functions like Invoke , BeginInvoke etc. I can only see the definitions for it. Where does these functions are defined? Are they defined outside of the .net BCLs? Delegates are handled specially by the CLR, basically. The compiler provides the signatures, but the CLR knows what to do with them. Section 8.9.3 of ECMA-335 partition I talks about this: Delegates are the object-oriented equivalent

Decompiling VB.Net assembly produces code with invalid member variable names; names starting with $STATIC$

China☆狼群 提交于 2019-11-29 15:03:20
I am doing work for a client who has lost the source code for one of their VB.Net WinForms applications. The assembly they have is not obfuscated at all. I am trying to recover as much of the source as I can as C# source and have tried several tools for decompiling assemblies, including Reflector, ILSpy and JustDecompile (all the latest versions), but they all produce code with a huge number of errors in them. Because of the large number of errors in the generated code, I am going to ask about the specific errors (in different questions), hopefully to get more directed answers and in this way

Load WPF application from the memory

拜拜、爱过 提交于 2019-11-29 14:52:54
So this is how you invoke Main() in non WPF applications: var entry = assembly.EntryPoint; if (assembly.EntryPoint.GetParameters().Length == 0) entry.Invoke(null, new object[0]); else entry.Invoke(null, new object[] { args }); but somehow it doesn't work at all for WPF applications, I've tried (MSDN's way): Assembly asm = Assembly.LoadFrom(file); Type myType = asm.GetType("WpfApplication1.App"); // Get the method to call. MethodInfo myMethod = myType.GetMethod("Main"); // Create an instance. object obj = Activator.CreateInstance(myType); // Execute the method. myMethod.Invoke(obj, null); still

What is the ampersand character at the end of an object type?

时光怂恿深爱的人放手 提交于 2019-11-29 13:33:52
I had to de-compile some code and I don't know what this syntax is? Can y'all help, or point me to a write-up about what it is? I've Googled and searched this site and can't find anything. Just one line of code: Rectangle pageBounds; // ISSUE: explicit reference operation // ISSUE: variable of a reference type Rectangle& local = @pageBounds; What is the @ symbol at the end of the Rectangle object type, and the @ before the pageBounds variable? This is my last line of code that I need to fix in order to get this executable to compile again. Here's the method that uses this syntax, can I get

Using Reflector To Create VisualStudio Project

给你一囗甜甜゛ 提交于 2019-11-29 03:37:39
I have a .exe app which I want to understand better - I can see it in reflector Is there any way to get reflector to create a VS project with the code so I can view it properly in Visual Studio? Nothing special is needed, it is built into Reflector, albeit not very discoverable. Right-click the assembly in the left pane and choose Export. You'll get a chance to change the output directory. Click OK and Reflector starts decompiling the code, creating a source file for each individual class. And creates a .csproj file which you can open in Visual Studio. Check out Jason Bock's FileGenerator , it

Where does delegates' constructors and member functions are defined?

青春壹個敷衍的年華 提交于 2019-11-28 09:40:32
问题 When I was looking at the Action delegates in Reflector, I saw it has a constructor like public Action(object @object, IntPtr method); But I could not find any body for the same along with other member functions like Invoke , BeginInvoke etc. I can only see the definitions for it. Where does these functions are defined? Are they defined outside of the .net BCLs? 回答1: Delegates are handled specially by the CLR, basically. The compiler provides the signatures, but the CLR knows what to do with

Decompiling VB.Net assembly produces code with invalid member variable names; names starting with $STATIC$

淺唱寂寞╮ 提交于 2019-11-28 08:53:51
问题 I am doing work for a client who has lost the source code for one of their VB.Net WinForms applications. The assembly they have is not obfuscated at all. I am trying to recover as much of the source as I can as C# source and have tried several tools for decompiling assemblies, including Reflector, ILSpy and JustDecompile (all the latest versions), but they all produce code with a huge number of errors in them. Because of the large number of errors in the generated code, I am going to ask