Eval Function in C# -


how can evaluate string in c# windows application because need dynamically select object in form based on combination of 2 string give me name of needed object

you can trycontrolcollection.find method find control name.
example:

myform.controls.find("foobutton", true); 

method returns array of control element name property set "foobutton".

there no c# eval equivalent. link can find useful answers. ofc, if want find or evaluate winform controls

update: think better control key directly. example:

control control = this.controls["footxtbox"]; if(control==null)         {             messagebox.show("control not found");         } control.text = "something"; 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -