An attribute instance is an instance of the attribute class. You initialize an attribute instance with the named and positional arguments.
There are a number of steps that are performed when the compiler encounters an attribute in C# code. The steps are as follows:
When the compiler encounters a statement that instantiates an attribute, it locates a constructor for the attribute class.
If a public constructor is found, it is invoked.
If the constructor found does not have public accessibility, a compilation error occurs.
For each named argument mentioned for the attribute, a nonstatic read-write public field or property must be present in the attribute. If no such field or property ...