❔ Winforms Property from BaseClass Form not getting transferred to derived Form
Hi. Don't know if you guys can help an amateur. I know most of you guys don't like winforms, but...
namespace MyApp.Common{ public partial class BaseForm : Form { private Guid _guid = Guid.NewGuid(); public Guid GUID { get { return _guid; } set { _guid = value; } } }}namespace MyApp.Presentation{ public partial class Admin : BaseForm { }}
namespace MyApp.Common{ public partial class BaseForm : Form { private Guid _guid = Guid.NewGuid(); public Guid GUID { get { return _guid; } set { _guid = value; } } }}namespace MyApp.Presentation{ public partial class Admin : BaseForm { }}
When I bring up the form "Admin" in designer view, it opens with a new Guid every time (obs using the base class Guid), unless I manually set Guid myself and then it adds it in Admin.Designer.cs.this.Guid="(whatever)" - this is missing until I manually add it. Is there any inheritance trick I can pull in the base class to force VS to create the this.Guid in Admin.Desginer.cs. Been messing around with this all day now!