reflector

.NET Reflector and getters/setters issue

I'm using an up-to-date .NET Reflector to disassemble an internal legacy app whose source code is almost impossible to recover. I need to find the cause of a nasty bug, and then possibly patch it. Reflector did a good job as usual in the re-creation of the project's structure, but soon I discovered that some property calls were left "exp...

Obsfuscating C# code

Possible Duplicates: Protect .NET code from reverse engineering? What do you use to protect your .NET code from reverse engineering? How can I protect my .NET assemblies from decompilation? Given that C# can be reflected and decompiled, can you suggest how I can obsfucate my code or protect it from reverse engineering? ...

How can I trace where potential exceptions might be thrown from?

We have many questions here about stack traces and analyzing exceptions that have been thrown. I am using RedGate Reflector to examine the workings of some .net classes. In particular, I am looking at the ConnectionString property of the System.Data.SqlClient.SqlConnection object. Reflector indicates that this property may throw an Ar...

Why check this != null?

Occasionally I like to spend some time looking at the .NET code just to see how things are implemented behind the scenes. I stumbled upon this gem while looking at the String.Equals method via Reflector. C# [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] public override bool Equals(object obj) { string strB = ob...

decompiling an asp.net site

hallo all i have an asp.net site which i have no source code for it. anyway i would like to decompile the whole site and that way i can work on it agian. how can i decompile an entire website easily to c# and not do it file by file with feflactor? please help me with this, thank you! ...

Find the approximate disk spaced used by a specific class in an assembly

Is it possible to determine the disk spaced used by a class, namespace or method in an assembly? For example in Reflector you can see the number of bytes used by resources in the selected assembly. I am asking because I am working with Silverlight and my client executable (xap) is getting quite big. It's already possible to see the siz...

Reflector Not Decompiling 'System.Data.Entity.dll' .NET 4.0

When looking at the System.Data.Entity.dll for .NET 4.0, no methods are being decompiled. I only see the method stubs. I tried re-installing reflector but it still didn't work. I am able to decompile other .NET assemblies just fine. ...

How do I create an installer for a .NET winforms application so it doesn't need to install?

I'm responsible for an in-house application that is deployed as a ClickOnce application. We run into issues reasonably frequently when a developer runs the tool after a a several new versions have been published (due to new features, bug fixes or whatever) and the output of the tool no longer conforms to what the developer is expecting...

Obtained by reflection method of implementation class

public void Express(Expression<Func<User, bool>> express) { BLL.Manager.ILogManager logs = BLL.Container.ObjectContainer.getObject<BLL.Manager.ILogManager>(); logs.GetAll(1); var total = logs.LastPageTotal; } As the above code, I need to know ILogManager the implementation class, I only know that the information reflected t...

How to have reflector load a different framework on load

When you first start .NET Reflector, it'll ask you what framework's base assemblies it should load. I often switch from framework to framework and wondered how I could have it popup that question each time (other than reinstalling). Or do I have to manually create lists for each I can't seem to find it anywhere in the menu or under opti...

How do you safely store an encryption key in .Net?

If you have a .Net application (or any other application for that matter,) how do you safely store internal encryption keys? I'm not talking about user-entered keys, but keys that are hard-coded in the program itself, for talking between other instances of the program. For example, if you have a peer to peer type program, you may want to...

SoapExtensionReflector issue rewriting response for different domains

Hello, I have a web service deployed on a machine that is attending requests on 2 different domains. One internal (intranet) and another one external (internet). So I can make requests like this: [internaldomain]/myservice.asmx or [externaldomain]/myservice.asmx the external domain works because another machine is resending the requ...

Odd Reflector Decompile with Invalid Token Error

Would some kind person help me sort out the output of .Net Reflector v6.5 that does not compile? I think that the symbols are out of whack but global search and replace might fix that. I don't get the odd class definition. Ideas? [CompilerGenerated] private sealed class <ApplicationTaskIterator>d__0 : IEnumerable<ApplicationT...

How to make Reflector not Choke on new syntax

Is there a way to make reflector disassemble back to the new c# constructs? Auto-Implemented properties are coming out like this: [CompilerGenerated] private string <TypeName>k__BackingField; public string TypeName { [CompilerGenerated] get { return this.<TypeName>k__BackingField; } [CompilerGener...

Would Reflector be technically illegal to use based on most EULAs?

My company just bought Reflector, but our lawyers are saying that we legally cannot use it except for open source code (i.e. cannot use it for most Microsoft and almost all 3rd party code). They claim that because EULA's typically prevent a user from "reverse engineering" the code, that Reflector breaks the EULA by definition. Any expe...

HashSet equality c#

I have a HashSet with it's own EqualityComparer, but I am wondering if a simple count of both sets is used before checking each element? I thought I would be able to answer this for myself in Reflector but I couldn't find any override of Equals in there. Cheers, Berryl EDIT ========== As Hans noted, it it the comparison of two sets ...

How to restore information about partial class from DLL?

DLL contains partial class DisPart defined in two places: public partial class DisPart { public static string s; } public partial class DisPart { public static int i; } Disassembling the DLL in Reflector results in: public class DisPart { public static int i; public static string s; } Is there any possibility to r...

Is there any concept in c++ like reflector in .Net?

i like to get code from c++ dll ,i know we easily get from .Net dll by reflector. Is there any method available in c++ for this? Thanks In Advance ...

Can .NET dissemblers like Reflector access the comments in the origial source code?

the comments are not XML comments, just normal comments ...

Where does delegates' constructors and member functions are defined?

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 define...