There are two forms. Form2 is derived from Form1.
But I have an issue with Form2 in design mode as shown on the screenshot below.
If I will comment this this._presenter.Retrive();
it will work fine. Whats going on and how to solve the problem?
UPD: If I will remove the throw new NotImplementedException(); and will insert, for example, MessageBox.Show("Test");, every time I will open Form2 the MessageBox will appears as though I run the application.
Form2
namespace InheritanceDemo
{
public partial class Form2 : Form1
{
public Form2()
{
InitializeComponent();
}
}
}
Form1
namespace InheritanceDemo
{
public partial class Form1 : Form
{
protected IPresenter _presenter;
public Form1()
{
InitializeComponent();
_presenter = new Presenters();
}
private void Form1_Load(object sender, EventArgs e)
{
this._presenter.Retrive();
}
}
public class Presenters : IPresenter
{
public void Retrive()
{
throw new NotImplementedException();
}
}
public interface IPresenter
{
void Retrive();
}
}
throw new NotImplementedException();
do something else.... :) – Nsfthrow new NotImplementedException();
and will insert, for example,MessageBox.Show("Test");
, every time I will open Form2 theMessageBox
will appears as though I run the application. – Rime