If you are a .NET developer, you should probably know the .NET Reflector which is a great tool for viewing, navigating and searching through the class hierarchies of .NET assemblies (even if you don’t have the code for them). I am using this tool a lot but here is something I only recently discovered: one can export an assembly and let the Reflector generate its source code. The output of this process is a directory with a project file and all of the source files.
Lets deep dive into this process. The first thing to do is to drag the assembly you’re interested in into the Reflector. I want to show my case on the XHTML sitemap validation tool dll, which can be downloaded from our Freebies page. The next step is to right click on this assembly and choose the Export menu option:
It is very common to use resource files in .Net applications when you need to store some data in a XML file. I usually use .resx files as string tables in order to avoid hard coded strings in my code. Two months ago, we published a post about a free tool which helps to extract hard coded strings to resource files. Notice that when you add a resource file, there is an automatically generated class with properties issued from the resources elements, so you can call this class properties instead of using the ResourceManager. The only problem with this class is that its properties are marked as internal and thus can’t be accessed externally (from other assemblies).