Here is my code
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;
}
}
-
It works and i can send either a textbox control, or a combobox control
as the first argument. But written like this they look like two
different functions, is there another way of writing to the above to
make it more obvious that they are the same function just overloaded?
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;
}
}
-
It works and i can send either a textbox control, or a combobox control
as the first argument. But written like this they look like two
different functions, is there another way of writing to the above to
make it more obvious that they are the same function just overloaded?
Comment