Using reflection to retrieve constructor used to instantiate attribute
- by summatix
How can I retrieve information about how an attribute was instantiated?
Consider I have the following class definitions:
[AttributeUsage(AttributeTargets.Class)]
public class ExampleAttribute : Attribute
{
public ExampleAttribute(string value) { Value = value; }
public string Value { get; private set; }
}
[ExampleAttribute("test")]…