I had a problem when the base constructor for the derived class fails. I have done this a hundred times, and I canβt understand all my life why the base constructor fails. I hope someone finds something simple that I miss. The following is sample code. Does anyone not know why my base constructor is not called first? I have other classes that are implemented the same way, and the base constructor is always called first.
if (item.GetType() == typeof(OtherChargeItem)) { OtherChargeItemAddUpdateTest test = new OtherChargeItemAddUpdateTest((OtherChargeItem)item); test.StartPosition = FormStartPosition.CenterParent; test.ShowDialog(); } public OtherChargeItemAddUpdateTest() { InitializeComponent(); } public OtherChargeItemAddUpdateTest(OtherChargeItem item) : base() { currentItem = item; }
source share