How to keep Custom Attributes when restarting a file?

I guess this helps : C# numericUpDown & button Issue