This could be very basic..
I have a class
[Version("2"), Caching(false)]
class Sample
{
.....
}
How can i access the values of the attributes Version and Caching in C#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually isn’t that basic. The way to do this is through reflection.
Here is a microsoft tutorial at how to do it.
Reflection an interesting new technology that allows you to see a class as if from the side -> getting access to private and protected fields and functions, as well as attributes.