I have two Projects in one Solution and I want to call a Method from Project1 in Project 2. I already refered the Namespace of Project1 in Project2. The Method from Project1 looks like this:
public void pauseCapturing(bool checkPause) { if (checkPause) { backgroundThread.Suspend(); } else { backgroundThread.Resume(); } } In Project2 I call that Method like that:
private void buttonPause_Click(object sender, EventArgs e) { buttonPause.Enabled = false; NamespaceProject1.Class.pauseCapturing(true); } When I try to run the code i get the following error:
Error 1 'NamespaceProject1.Class' does not contain a definition for 'pauseCapturing'
I didn't really found a helpful answer to solve my problem.
Class?classis a KeyWord but notClass.