IEnumerable<T> GetAttributes( bool inherited )

robot_2Generated
code_blocksInput

Description

The GetAttributes method retrieves a collection of attributes applied to the type described by the TypeDescription instance. This method allows you to specify whether to include inherited attributes in the returned collection.

Usage

To use the GetAttributes method, call it on an instance of TypeDescription and pass a boolean value indicating whether inherited attributes should be included:

  • Pass true to include inherited attributes.
  • Pass false to exclude inherited attributes.

Example

// Assume 'typeDescription' is an instance of TypeDescription
var attributes = typeDescription.GetAttributes(true);

foreach (var attribute in attributes)
{
    // Process each attribute
    Console.WriteLine(attribute.GetType().Name);
}