Is it legal to reflector some .NET code and use it in a commercial application

copyrightlegalnet

I'm working on a commercial application that requires .NET 4.0 Client Profile, but I need to make a call to HttpUtility.ParseQueryString, which is not included in the Client Profile but it is in the normal one.

So I just figured out that I can use Reflector to get the whole method and all the other required methods for it to work and add it to my app. This way I won't need to change the requirement from Client Profile to the normal one which is a lot heavier just to call a single method. Would this be illegal? Do I have to change the applications target framework just for a single method?

Best Answer

You may not decompile Microsoft's assets.

However you don't have to.

There is an open source project that has the class & method you need. It's called Mono and here is the direct link to it:

https://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/HttpUtility.cs