R
Rich
I want to display a list of various C# procedures in a listbox control. When
the user selects an item (one of the procedures) in the listbox I want to
invoke the selected procedure from the listbox click event. I want to list
each procedure in some type of array where I call the array in the click
event something like this: (pseudo code)
private void listbox1_Click(object sender, EventArgs e)
{
myProcArray(listbox1.SelectedIndex);
}
public void proc1()
{...
}
public void proc2()
{...
}
....
I am hoping to bypass the switch/case construct and just invoke the
procedures from a procedure array. How do I create such an array of
procedures?
Thanks
the user selects an item (one of the procedures) in the listbox I want to
invoke the selected procedure from the listbox click event. I want to list
each procedure in some type of array where I call the array in the click
event something like this: (pseudo code)
private void listbox1_Click(object sender, EventArgs e)
{
myProcArray(listbox1.SelectedIndex);
}
public void proc1()
{...
}
public void proc2()
{...
}
....
I am hoping to bypass the switch/case construct and just invoke the
procedures from a procedure array. How do I create such an array of
procedures?
Thanks