NOTE
I am supporting the idea that the below issue is way impossible to do.
Pls, do not misunderstand me.
It is not me. Please read the question carefully.
I have involved a discussion about casting string value type to System.Windows.Forms.Label Class. Other guys have supported that it is possible but for me, it is impossible with current release of C#.
Am I missing something? The guy is trying the following code;
NOTE-2
The below code is not written by me !
lbl=((Label)("label"+"1"));
I don’t know that I am being just ignorant but it is so impossible for me that it can be even done by Jon Skeet.
what is the deal here?
The only way that code could work is by creating a casting operator, however they have to define that within the type declaration, and neither
stringnorLabelhave such a casting operator.Do they want to get the label on their form called label1?
If so, they can use the
FindControlofPage, or the control that the label is placed on.