I have the following code snippet:
[Campo(Chave=true)]
public System.Guid EscalaId { get; set; }
I know that I can read these tributes using the MemberInfo
class, as the example in the documentation says:
System.Reflection.MemberInfo info = typeof(MyClass);
object[] attributes = info.GetCustomAttributes(true);
But are there alternatives without the use of reflection?