Hello,
I have partial class:
Like you see I have class separated in two files, because one is autogenerated and can be rewriten.Code:public partial class MyClass { private MyClass() { //AUTO GENERATED CODE } //OTHER AUTO GENERATED CODE } public partial class MyClass { private MyClass() { this.SomeThingChanged += new System.EventHandler(this.ShowChangeMessage); } private void ShowChangeMessage() {} }
My question is how to add event handler in my additional class if there already is default constructor in autogenerated class?
I got error: Type 'MyClass' already defines a member called 'MyClass' with the same parameter types![]()




Reply With Quote