O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 28. Writing custom attributes

It is recommended that you read and understand Chapter 27 before tackling this chapter.

Custom attributes are attributes which you write and use in your own creative way. However, unlike standard attributes, there is no way you can create custom attributes which can affect how your code compiles (i.e. attributes which are recognizable by the C# compiler) or that may be automatically interpreted by the CLR. Instead, custom attributes are only useful when you use reflection code to interpret and respond to them during runtime.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required