Adding attributes to auto generated classes

Nov 12, 2009 at 11:01 AM

I'm trying to render the contents of a generated LinqToXsd class into a custom system.Windows.forms.Propertygrid

I've created the converter class by inheriting system.Componentmodel.ExpandableObjectConverter and all is well there.

My problem is trying to apply the TypeConverterAttribute to the LinqToXsd generated class as this gets regenerated at each compile.

How can I apply the attribute without it being removed when the LinqToXsd class is regenerated?

Feb 27, 2010 at 3:32 AM

The class is generated as "partial" so you may create a file where you apply all attributes to the class.