PDA

Click to See Complete Forum and Search --> : pass array to a control event


Muddy
Jul 28th, 2006, 09:38 AM
Can someone please have a look and help me figure this out. Thanks in advance for any help.
I need to access an array inside a control event.
I changed the valuechanged event declaration for a trackbar to:

private void trbXMin_ValueChanged(object sender, EventArgs e, double [,] arrOrig)

but now I get this error:
Error 1 No overload for 'trbXMin_ValueChanged' matches delegate 'System.EventHandler' C:\Documents and Settings\Mark\My Documents\Visual Studio 2005\Projects\Visualizer\Visualizer\frmMain.Designer.cs 96 42 Visualizer


highlighting this line:
this.trbXMin.ValueChanged += new System.EventHandler(this.trbXMin_ValueChanged);

Muddy
Jul 28th, 2006, 09:58 AM
I just realized how absurd my question was :)

I still need access to the array from within the event though.

What is the C# equivalent of a VB6 public array?

Muddy
Jul 28th, 2006, 10:04 AM
Got it ... just needed to exapand the decl scope.

sorry for the lame questions ... trying to learn C# is kinda tough for a VB dinosaur ... lol