but can anybody give me a reason when that tool would be useful ?
Example 1: Imagine you had to write a RegExp compiler - a class that takes a
Regular expression and compiles it into IL-code which gets JITed when first
used: a sound understanding of IL would be a great aid, ILASM will be a
great help during development.
(Of course, the same applies to any other compiler you would like to write,
too)
Example 2: There are some (although very very few) things that cannot be
done in C#, but in ILASM, or that can be done more efficiently in ILASM, so
it might sometimes be useful to use IL-Assembler code instead of C# code in
production code.
Example 3: Sometimes it is neccessary to change code without having the
sources (e.g. to remove a bug from an old application where the source code
is no longer available). This is only possible with IL - since executables
cannot be decompiled to C# code.
Just to name a few.
Niki