开发者

Is there such a thing as a comment in IL?

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# compi开发者_如何学Cler) 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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜