Feel reflector than ilspy easy to use, but reflector charge. Ilspy often decompile something out of the mess. But in use, it is best to use the two together, because often decompile the code error, but do not know why, two contrast to know, like the following picture:
On the left is Ilspy, the right is reflector, two decompile results are not the same, the error is not the same.
1. Error CS0579
Error cs0579:duplicate ' Global::system.runtime.versioning.targetframeworkattribute ' attribute
CS0579 "Global::system.runtime.versioning.targetframeworkattribute" feature repeat
This problem is encountered when you add multiple projects that you decompile to a solution: Locate the AssemblyInfo.cs file for each project, and
[Assembly:targetframework (". netframework,version=v4.0 ", Frameworkdisplayname =". NET Framework 4 ")]
This comment out, then compile will not be a problem.
2. (Reflector) set get accessor decompile
public string username{get; set;}
/* Normal code * *
username= "David";
string Uname=username;
/* Reflector The result of decompile
/Set_username ("David");
String Uname=get_username ();