c# - How to pass control to a method -
I want to make a method that changes the competent properties
Public Zero ChangeProperties ( } {BtnAcesScore.Enabled = true; How can I pass a basic contorl name and property? }
I want to be able to change the "BTNASSScore" every time I call this method, how can I pass it? I tried to pass it as a string but it does not work.
Here's what I have tried:
Change the public zeroproperty (string category) {class = true; } ChangeProperties ("btnAcesScore.Enabled"); Susan
Try it out:
Public Zero ChangeProperties (Control ctrl) {ctrl.Enabled = true; } And call it like this:
ChangeProperties (btnAcesScore);
Comments
Post a Comment