I want to add classes from System.Activites.Presentation my custom attribute. I tried to do it with emit(TypeBuilder, ModuleBuilder, AssemblyBuilder). Is it possible to change an existing type by adding an attribute to it? Or how to tell TypeBuilder, so that it uses an existing data type? Or inherit from a given type?
Thank you.
I want to add classes from System.Activites.Presentation my custom attribute. I tried to do
Share
You can’t add attributes to
Systemclasses but, if they are not marked asSealedyou can create your custom class deriving from original and adding custom attribute.All your code must call derived class, that is identical to the original except on the attribute added.