java Java注解C#等效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10455900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 01:06:45  来源:igfitidea点击:

Java Annotation C# equivalent

c#java.netannotations

提问by Mittchel

Possible Duplicate:
What are the similarities and differences between Java Annotations and C# Attributes?

可能的重复:
Java 注释和 C# 属性之间有什么异同?

Currently we are translating an Java project into C#, but we're having problems finding out what the C# equivalent is for Java annotation. How do we write the exact same thing as this java code into C#?:

目前我们正在将一个 Java 项目翻译成 C#,但是我们在找出 Java 注释的 C# 等效项时遇到了问题。我们如何将与此 java 代码完全相同的内容写入 C#?:

public @interface LatitudeAnnotation {
    public String author() default "Themaopdracht 7 tester";
}

回答by DarthVader

Attributesare to C# what annotations are to Java

属性对于 C# 就像注解对于 Java