KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I currently have a function: public static Attribute GetAttribute(MemberInfo Member, Type AttributeType) { Object[] Attributes = Member.GetCustomAttributes(AttributeType, true); if (Attributes.Length > 0) return (Attribute)Attributes[0]; else return null; } I am wondering if it would be worthwhile caching all the attributes on a property into a Attribute = _cache[MemberInfo][Type] dictionary, This would require using GetCustomAttributes without any type parameter then enumerating over the result. Is it worth it?
Tags (comma-separated)
Save Edits
Cancel