You can easily decompile the source code of any .net program using something like Reflector. That's probably why the code "sucks" as it's written by machine, not human.
written by machine? So Reflector actually "rewrites" it? Or is that really transfering binary back to real 100% identical source code?
Originally Posted by g3n3sis
btw how are you getting the source?
written by machine? So Reflector actually "rewrites" it? Or is that really transfering binary back to real 100% identical source code?
To understand that, you have to first understand that .net applications (such as games written in XNA or programs written in c# compiled into .net like your average visual studio application) aren't compiled to machine code. They are compiled to a lower level language that the .NET virtual machine can understand. This isnt the machine code that you are thinking of (you are probably thinking of lower level 0's and 1's and logic interpreted by the processor). This VM code is still available to be written back up into a high level language for many reasons, such as making debugging a ton easier. Thus, the program "Reflector" takes the lower level vm language and writes it back into the C# you and I are familiar with, but since things like comments and certain grouping techniques aren't actually compiled, we don't see them when Reflector spits the source out.
Anyone is open to correct me if im wrong about the vm.