Open sandboxFocus

Property AttributePriority

AttributePriority

Gets or sets the priority of the current attribute when multiple instances are defined on the same element (lower values are processed first).

Declaration
public int AttributePriority { get; set; }
Property Value
Type Description
int
Remarks

You should use only 16-bit values in user code. The top 16 bits are reserved for the system.

When the multicast attribute is applied via an XML configuration file, the default value is set to the 1-based ordinal of the appearance of the attribute in the XML configuration file. When the multicast attribute is applied in the source code, the default value is 0.

Instances applied on a container, such as the assembly or a type, are always processed before instances applied on an element of that container; this property orders instances of the same attribute type applied at the same level. The C# compiler does not guarantee the order of custom attributes, so set this property when the order matters, for example when you combine AttributeExclude or AttributeReplace with other instances.

See Also