24

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

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#?:

public @interface LatitudeAnnotation {
    public String author() default "Themaopdracht 7 tester";
}
Community
  • 1
  • 1
Mittchel
  • 1,896
  • 3
  • 19
  • 37

1 Answers1

33

Attributes are to C# what annotations are to Java

iamchris
  • 2,621
  • 1
  • 16
  • 15
DarthVader
  • 52,984
  • 76
  • 209
  • 300
  • This link is no longer valid, I found the following reference useful https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/. – Conor Svensson Dec 15 '17 at 15:20