Check out example codes for "attribute usage c#". It will help you in understanding the concepts better.

Code Example 1

//The AttributeUsage attribute enables you to control:
//- Which program elements attribute may be applied to. ...
//- Whether an attribute can be applied to a single program element multiple times.
//- Whether attributes are inherited by derived classes.

//Here is an example:
using System;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, inherited = true)]
public class MyClass : Attribute // or any other class that somehow implements Attribute
{
	//Do stuff
}

Learn ReactJs, React Native from akashmittal.com