Home > Net >  Winfrom type string into control object name in the form
Winfrom type string into control object name in the form

Time:09-26

Have anyone who can answer it, said about it, thank you

CodePudding user response:

And also can be used in the code attribute

CodePudding user response:

 
Private void button1_Click (object sender, EventArgs e)
{
Var list=this. Controls. The Find (" for ", true);
If (list. Any ())
{
MessageBox. Show (the list [0]. Text);
}
}


This?

You can also use a reflection

CodePudding user response:

Said is to find the control word can be upstairs, said the space is to modify the name of the word have to under the code inside to find the corresponding attribute assignment

CodePudding user response:

Thank you, ladies and gentlemen, I have found the

CodePudding user response:

references a. 4 floor series response:
thank you, ladies and gentlemen, I have found the

Found that share

CodePudding user response:

https://blog.csdn.net/xianfajushi/article/details/38984049

CodePudding user response:

It is ok to direct attribute assignment

CodePudding user response:

I also silly traversal, originally is directly can call,
  •  Tags:  
  • C#
  • Related