private void updateticks(Tex tBox textbox, CheckBox tickbox)
{
if (textbox.Text.L ength 0)
{
tickbox.Visible = true;
}
else
{
tickbox.Visible = false;
}
}
private void updateticks(Com boBox combox, CheckBox tickbox)
{
if (combox.Text.Le ngth 0)
{
tickbox.Visible = true;
}
else
{
tickbox.Visible = false;
}
}
======
the above works and i can pass either text box control or combo box
control as the first argument when calling the function. But in code it
looks like two different functions, is there anyway i can write the
above to make it more obvious that it's one function with two
overloaded sets of arguments?
{
if (textbox.Text.L ength 0)
{
tickbox.Visible = true;
}
else
{
tickbox.Visible = false;
}
}
private void updateticks(Com boBox combox, CheckBox tickbox)
{
if (combox.Text.Le ngth 0)
{
tickbox.Visible = true;
}
else
{
tickbox.Visible = false;
}
}
======
the above works and i can pass either text box control or combo box
control as the first argument when calling the function. But in code it
looks like two different functions, is there anyway i can write the
above to make it more obvious that it's one function with two
overloaded sets of arguments?
Comment