I have a class, lets call it Book with a property called Name. With that property, I have an attribute associated with it.
public class Book { [Author(\"
To get all attributes of a property in a dictionary use this:
typeof(Book) .GetProperty("Name") .GetCustomAttributes(false) .ToDictionary(a => a.GetType().Name, a => a);
remember to change from false to true if you want to include inheritted attributes as well.
false
true