I like to connect the DLL (which contains namespace Chart
) and call the subroutine public Simple()
from the second class (namespace WinApp2
). There is a error:
couldn't find type or namespace name Simple
Although I consider a reference and put using Chart
and created a instance in the second namespace.
namespace Chart
{
public partial class Simple : Form
{
Manage _mProject;
public Simple()
{
InitializeComponent();
_mProject = new Manage();
_mProject.Add(new Task() { Name = "New Task" });
_mChart.Init(_mProject);
}
}
}
using Chart;
namespace WinApp2
{
public partial class Form4 : Form
{
Form2 fh;
public Form4(Form2 aufrufer)
{
fh = aufrufer;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var instance = new Simple(); (error !!!)
instance.Simple();
}
}
}