I realize nobody just sits down and develops software in straight IL (do they?). But suppose you want to share a snippet of IL code (as output by, e.g., the C# compiler) with someone else for discussion, and furthermore you want to annotate it with a few comments. Is there an actual syntax for comments in IL so that you could do this without making the text invalid as IL? Not really a big deal, just curious.
Yes, you can use //
and /* ... */
just like in C#.
I can't find any reference to it in ECMA-335, but this IL guide includes:
The first two lines (started with
//
) are the comments. In ILAsm, you can comment in the same way as that in C# or C++. To comment multiple lines or the part of line, you can also use/* ... */
block as well.
you use // in IL for comments as well...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With