Is there a way to create a method that goes like this in c#:
public void showHide(string shOne, string shTwo, string shThree) {
button1.shOne();
button2.shTwo();
button3.shThree();
}
private void discountButton_Click(object sender, EventArgs e) {
showHide("Show", "Hide", "Hide")
// I was thinking that this should be the same as
// button1.Show();
// button2.Hide();
// button3.Hide();
}
Is this possible ? I'm designing a c# application for thesis and I need to show and hide buttons (lots of buttons and labels and stuff).
I'm using this code as of now but I keep getting error "'Panel' does not contain a definition for 'shOne'".
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire