I have a constructor that is in the generated code. I do not want to modify the generated code (because it will be overwritten during recovery), but I need to add some functionality to the constructor.
Here is a sample code:
// Generated file public partial class MyGeneratedClass { public MyGeneratedClass() { Does some generated stuff } }
The only solution I can come up with is the following:
// My hand made file public partial class MyGeneratedClass { public MyGeneratedClass(bool useOtherConstructor):this() { do my added functinallity } }
I'm sure this will work, but I have a lame unused parameter for my designers, and I have to change them all. Is there a better way? If not everything is fine, but I thought I would ask.
source share