Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

For the purposes of C# code generation in Sparx Enterprise Architect, is it possible to add class attributes, such as [Serializable]?

I am currently working in Sparx Enterprise Architect (EA) on the design of a system that will be implemented in C# and WPF.

I am designing the classes and wondered whether there was any way to give a class .NET attributes such as [Serializable] within EA so that when I generate the skeleton C# code from the model, these attributes are automatically applied.

(These are class attributes specific to .NET, defined just before the class definition. Not to be confused with attributes that are properties of the class)

like image 666
Phil Rogers Avatar asked Oct 19 '25 06:10

Phil Rogers


1 Answers

I've worked it out for myself.

The answer is to add a Tag named Attribute and give it the value [Serializable].

like image 176
Phil Rogers Avatar answered Oct 21 '25 19:10

Phil Rogers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!