i want to update a control based on a value e.g
if (StringName == StringName2)
ListBox1.Items.Add("send data");
else if (StringName3 == StringName4)
DifferentListBox.Items.Add("send data");
else if (StringName5 == StringName3)
AnotherListBox.Items.Add("send data");
// or done using a switch statement
// and so on another 20 times for example
is it possible to put these methods \\ (OneOfTheListBoxes.Items.Add("send data") \\ to be put in a dictionary so i only need to enter the key to action the method instead of itterating through each statement.
or can u point me to a practice that would make me acheive this? or achieve this in less code.
sorry for noob question