首先打開cmd命令。cd 到 C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
看看你有沒這2個工具,沒的話自己百度找下
然后把要查看的 dll文件或者exe文件拉進來這里面(因為我們是要用命令,你直接打開ildasm.exe也可以找到各目錄打開)
比如 text.dll (里面有console.writeline("hello word"))
ildasm text.dll 打開dll 找到方法可以查看
ildasm text.dll /output:text.il 按回車就編譯好一個il文件(可用記事本打開並且編輯hello word保存)
然后用ilasm工具反匯編成 dll或者exe 文件
ilasm text 按回車自動查找text4.il 文件並且編譯成 text4.exe
或 ildasm text /dll 可以編譯成 text.dll 文件(記得先刪除原來的text4.dll)