Hello,
Say I have this class:
class block999
{
string parm1;
string parm2;
string parm3;
string parm4;
string parm5;
block999(){}
setValue(object sender, RoutedEventArgs e)
{
}
}
And a form with this code:
block999 B999 = new block999();
TextBox parm1 = new TextBox();
TextBox parm2 = new TextBox();
TextBox parm3 = new TextBox();
TextBox parm4 = new TextBox();
TextBox parm5 = new TextBox();
parm1.LostFocus += new RoutedEventHandler(B999.setValue);
parm2.LostFocus += new RoutedEventHandler(B999.setValue);
parm3.LostFocus += new RoutedEventHandler(B999.setValue);
parm4.LostFocus += new RoutedEventHandler(B999.setValue);
parm5.LostFocus += new RoutedEventHandler(B999.setValue);
How can I set the correct property in the setValue method assuming that the instance property name == the textboxes' name?