Logarius
Logarius

Reputation: 1

ILSpy,How to make IL Code looks more like native C# instead of machine code

this is my result

this is what i want to see

I've only just started using ILSpy,the dll is compined with Unity Self,and i just drag the Assembly-CSharp.dll into ILSpy,I have searched for a long time but nothing leaned.Is there some setting i need?

Upvotes: 0

Views: 1278

Answers (2)

TomTom
TomTom

Reputation: 62093

What do you even mean?

C# code is COMPILED INTO IL CODE.

IL Code does not look like C# code because it is another language. If you drag an assembly into ILSpy it can only show you the IL - why on earth would it show you anything that even remotely looks like C# Code? ILSpy is there to show you the IL Code - you can not make that IL Code look like C# code. This is like "how do I make English follow German syntax".

Now, there are decompilers. The answer for them is: Write IL code as the compiler would.

Upvotes: 0

In the top menubar of ILSpy you can see a combobox/dropdown, which selects the decompiler's output target language. I suspect it is set to IL in your case. Change its value to C#, and your situation should improve...

Upvotes: 2

Related Questions