Sunday, 19 June 2016

c# components inaccessible on inherited form due to protection level

//base form
protected virtual void button1_Click(object sender, EventArgs e)

//inherited form
protected override void button1_Click(object sender, EventArgs e)

//for components to be called on inherited form, change protected level on base.designer

//base.designer
protected System.Windows.Forms.TextBox UX_ID;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
protected System.Windows.Forms.ListBox ListBox1;
protected System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem;
private System.Windows.Forms.Label label3;

No comments:

Post a Comment