I am pretty sure that reverse-engineering\decompiling .Net libraries which have no protection methods to prevent this is legal (at least in the EU and US) using tools such as Reflector. This is something that I do from time-to-time myself e.g. when faced with particular bugs, or lack of API documentation.
I am thinking of the .Net framework as an example.
However, is it then legal to make the source code obtained from decompilation publicly available e.g. by posting a decompiled C# representation of that code on a website such as Stack Overflow?
Update
This relates to publishing small samples.
Update 2
Supporting evidence for answers would be helpful.