在dotnet中使用注释 [英] annotation using in dotnet
问题描述
我从未使用过C#属性,但了解它们与Java注释大致相同.
如果我继续使用属性替换注释的端口,那我需要知道些什么?会是一样的吗?不同的?什么会咬我?
至于我的研究,我发现
C#使用从编译时符号驱动的ConditionalAttribute属性
我只想知道我们是否可以自己编写注释,以及哪个版本的dotnet支持它?
值得赞赏的是,如果我有任何样品或文件要阅读
等待您的宝贵答复和评论
I''ve never used C# attributes, but understand that they are the rough equivalent of Java annotations.
If I proceed with the port using attributes to replace annotations, what do I need to know? What''s going to be the same? Different? What''s going to bite me?
As for as my research i found that
C# uses the ConditionalAttribute attribute that is driven from compile time symbols
i just want to know whether can we write annotation on our own and which versions of dotnet supports it?
It is appreciated that if i got any samples or documents to read
Waiting for your valuable response and comments
推荐答案
查看是否有这些帮助:
http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html [^ ]
http://docs.oracle.com/javase/1.5.0/docs/guide/language/annotations.html [ ^ ]
http://en.wikipedia.org/wiki/Java_annotation [ http://www.dreamincode.net/forums/topic/87842-what -is-annotation-in-java/ [ http://www.developer.com/java/other/article.php/3556176/An-Introduction-to-Java-Annotations.htm [
See if these help:
http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html[^]
http://docs.oracle.com/javase/1.5.0/docs/guide/language/annotations.html[^]
http://en.wikipedia.org/wiki/Java_annotation[^]
http://www.dreamincode.net/forums/topic/87842-what-is-annotation-in-java/[^]
http://www.developer.com/java/other/article.php/3556176/An-Introduction-to-Java-Annotations.htm[^]
这篇关于在dotnet中使用注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!