Variable name as object name?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I would like to use a variable name as an object name. In theory this would
work like this

string strName = "objectName";

TextBox strName = new TextBox();

strName.Text = "I used a variable as object name";

This, of course, does not work. How can I do this?

Thanks guys

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top