Suppose I have a label control on a windows form called \"UserName\". How can I refer to that label programmatically using the label name?
For example I can do:
Unless I'm misunderstanding the question context, I think you're making it too difficult. in code, you just use thelabel name as your reference as in:
UserName.Text = "Something"
Is there something you're trying to accomplish that makes that not right?