I have 3 classes. One worker class who receives data, one GUI class and one class where i save my global variables.

In the worker class i want to changed the GUI in dependance of the received data. Therefore i save the value who should be sent to the GUI in a variable of my globals-class:

TestGlobals.NumberOfBoardsToCBBox = data[1];

then i call:


But when my PDA reaches these codefragment, it throws an "ArgumentException".

The relevant parts of my GUI-class looks like this:

namespace TestProg
public delegate void DelegateSetNumberOfBoardsToCBBox();

public class View : System.Windows.Forms.Form
public DelegateSetNumberOfBoardsToCBBox m_DelegateSetNumberOfBoardsToCBBox;
public void setNumberOfBoardsToCBBox()
int iNumberOfBoards = TestGlobals.NumberOfBoardsToCBBox;


Any Ideas what could be wrong? Thanks