开发者

Is possible to get the comments of an assembly through Reflection?

I would like to know开发者_如何学JAVA if there is a way to access comments on a class through Reflection or if they are completely stripped from the binaries.


No. Comments are stripped by the compiler - they're not present in the binaries, so there's no way to get them back.


Comments are ignored when code is compiled.

This means you can't get them "back" as they were never there in the first place.


Comments are ignored when code get complied by compiler.

But you can pass information in the Attributes by creating your own user defined attribute class.


Comments are not available from the binaries, but they are via XML. See this SO answer.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜