Friday, January 28, 2011

Reflection to pull description attribute for class


//get description from attribute on class
private static string GetDescription(Type type)
{
return (from v in type.GetCustomAttributes( typeof(System.ComponentModel.DescriptionAttribute), true)
select ((System.ComponentModel.DescriptionAttribute)v).Description).FirstOrDefault();
}


[Description("Users description!")]
public class MyClass
{
}


2 Comments:

At 8:20 PM, Blogger hermesonlinestore said...

I support your idea very much and here is a good choice for you no matter what mood you are: just remember to pay attention to the fashion trend of Hermes Kelly Birkin such as New Hermes or the other styles like Buy Hermes Birkin. I promise you will relax yourself. So come on, know more fashion style arround you and make yourself more confidence.

 
At 2:50 AM, Anonymous SEO said...

When you've got not believed about using an OBD2 scanner before AUTOBOSS PC MAX Wireless VCI, hopefully you can now think about acquiring one particular.

 

Post a Comment

<< Home