Culture neutral Description Attribute?

  • Thread starter Thread starter Vagabond Software
  • Start date Start date
V

Vagabond Software

I have added a few custom Description Attributes to an assembly. I have read that in order to make those Attributes culture neutral, I would have to create a custom Attribute class derived from System.ComponentModel.DescriptionAttribute and override the Description property to perform the appropriate lookup.

This seems to break on of the 'Attribute' rules, that all attributes should be derived from System.Attribute.

Though I can derive a class from either, it is not obvious to me how to perform the "appropriate lookup".

Any help would be greatly appreciated.

- carl
 
Vagabond Software said:
I have added a few custom Description Attributes to an assembly. I
have read that in order to make those Attributes culture neutral, I
would have to create a custom Attribute class derived from
System.ComponentModel.DescriptionAttribute and override the
Description property to perform the appropriate lookup.

This seems to break on of the 'Attribute' rules, that all attributes
should be derived from System.Attribute.

It doesn't break it at all, as DescriptionAttribute derives from
Attribute.
Though I can derive a class from either, it is not obvious to me how
to perform the "appropriate lookup".

Well, presumably you'd read the appropriate version of all the
descriptions from the resources, and then return the one from the
required culture.
 
Back
Top