4
I have a program that at some point works with the visibility of an object.
I’m creating a function and I don’t know how to reference objects.
private void Visible(object x, object y, object z, object a)
{
x.Visible = true;
y.Visible = true;
z.Visible = true;
a.Visible = true;
}
The .Visible
are in red underline, before I was doing manually, but with function decreases the number of lines of code.
How do I make the reference to TextBoxes
and Buttons
?
can you explain better? And improve if possible the part of the code...
– Don Vito
For example, I want to click on a button it will show +4 buttons .
– Yuri Ancelmo
I have several buttons with the same function of changing the visibility of other 4 , so to decrease the amount of codes I need to do the function , within this function I pass the parameters , which in case would be the components , For example " Visibility (textBox1,Button1,Button2,Button3);
– Yuri Ancelmo
These parameters that I passed will be changed the visibility
– Yuri Ancelmo