Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
QuestionSetup File Pin
Syed Shahid Hussain11-Mar-11 11:41
Syed Shahid Hussain11-Mar-11 11:41 
AnswerRe: Setup File Pin
thatraja11-Mar-11 12:50
professionalthatraja11-Mar-11 12:50 
GeneralRe: Setup File Pin
Syed Shahid Hussain11-Mar-11 13:10
Syed Shahid Hussain11-Mar-11 13:10 
AnswerRe: Setup File Pin
Dave Kreskowiak11-Mar-11 12:51
mveDave Kreskowiak11-Mar-11 12:51 
GeneralRe: Setup File Pin
Syed Shahid Hussain11-Mar-11 13:12
Syed Shahid Hussain11-Mar-11 13:12 
AnswerRe: Setup File Pin
Dalek Dave11-Mar-11 13:52
professionalDalek Dave11-Mar-11 13:52 
QuestionFinding controls [modified] Pin
Orcun Iyigun11-Mar-11 7:02
Orcun Iyigun11-Mar-11 7:02 
AnswerRe: Finding controls Pin
OriginalGriff11-Mar-11 9:09
mveOriginalGriff11-Mar-11 9:09 
1) You can do it - sort of - with reflection, but it is one heck of a sledgehammer to crap a simple nut. What you end up with will be longer than the code to do it directly, and a lot harder to read and understand.
If you really want to access a number of controls in a loop, can I suggest the simpler, elegant way of having a class level list of labels?
List<Label>myLabels = new List<Label>();
...
myLabels.Add(lblName1);
myLabels.Add(lblName2);
myLabels.Add(lblName3);
myLabels.Add(lblName4);
...
foreach (Label lab in myLabels)
   {
   lab.Text = txtName.Text;
   }


2) Not sure what you mean here: are you trying to do the same as in (1) but for CheckBox? If so, then the same answer applies. If not, then what are you trying to do?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Manfred R. Bihy: "Looks as if OP is learning resistant."

GeneralRe: Finding controls Pin
Orcun Iyigun11-Mar-11 9:50
Orcun Iyigun11-Mar-11 9:50 
AnswerRe: Finding controls Pin
GenJerDan11-Mar-11 11:26
GenJerDan11-Mar-11 11:26 
GeneralRe: Finding controls Pin
Orcun Iyigun11-Mar-11 11:32
Orcun Iyigun11-Mar-11 11:32 
GeneralRe: Finding controls Pin
GenJerDan11-Mar-11 14:44
GenJerDan11-Mar-11 14:44 
AnswerRe: Finding controls Pin
Luc Pattyn11-Mar-11 18:18
sitebuilderLuc Pattyn11-Mar-11 18:18 
GeneralRe: Finding controls Pin
GenJerDan12-Mar-11 3:01
GenJerDan12-Mar-11 3:01 
AnswerRe: Finding controls Pin
Luc Pattyn12-Mar-11 3:16
sitebuilderLuc Pattyn12-Mar-11 3:16 
AnswerRe: Finding controls Pin
JOAT-MON11-Mar-11 12:28
JOAT-MON11-Mar-11 12:28 
AnswerRe: Finding controls Pin
Dalek Dave11-Mar-11 14:13
professionalDalek Dave11-Mar-11 14:13 
AnswerRe: Finding controls Pin
Luc Pattyn11-Mar-11 18:16
sitebuilderLuc Pattyn11-Mar-11 18:16 
Questionstring.split question Pin
jashimu11-Mar-11 4:59
jashimu11-Mar-11 4:59 
AnswerRe: string.split question Pin
Luc Pattyn11-Mar-11 5:12
sitebuilderLuc Pattyn11-Mar-11 5:12 
AnswerRe: string.split question Pin
Dan Mos11-Mar-11 5:18
Dan Mos11-Mar-11 5:18 
AnswerRe: string.split question Pin
Dalek Dave11-Mar-11 5:19
professionalDalek Dave11-Mar-11 5:19 
AnswerRe: string.split question Pin
#realJSOP12-Mar-11 3:41
mve#realJSOP12-Mar-11 3:41 
QuestionXML File user output [modified] Pin
Pierre besquent10-Mar-11 23:27
Pierre besquent10-Mar-11 23:27 
AnswerRe: XML File user output Pin
Tarun.K.S10-Mar-11 23:55
Tarun.K.S10-Mar-11 23:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.