public class Test { public List<A> GetAttributePropertyList<T, A>(T obj, string name) { List<A> list = new List<A>(); foreach (var property in obj.GetType().GetProperty(name).GetCustomAttributes(typeof(A), false)) { list.Add((A)property); } return list; } }