Click here to Skip to main content
15,946,988 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataGrid with checkbox Pin
DanB198330-Jun-07 8:24
DanB198330-Jun-07 8:24 
QuestionInvalid Argument exception? Pin
$uresh $hanmugam30-Jun-07 1:58
$uresh $hanmugam30-Jun-07 1:58 
AnswerRe: Invalid Argument exception? [modified] Pin
Luc Pattyn30-Jun-07 3:07
sitebuilderLuc Pattyn30-Jun-07 3:07 
Questionreading file error Pin
tauras8130-Jun-07 1:41
tauras8130-Jun-07 1:41 
AnswerRe: reading file error Pin
Luc Pattyn30-Jun-07 1:58
sitebuilderLuc Pattyn30-Jun-07 1:58 
Questionarray of type label Pin
Glen Harvy29-Jun-07 23:47
Glen Harvy29-Jun-07 23:47 
AnswerRe: array of type label Pin
Sathesh Sakthivel29-Jun-07 23:53
Sathesh Sakthivel29-Jun-07 23:53 
GeneralRe: array of type label Pin
Glen Harvy30-Jun-07 0:09
Glen Harvy30-Jun-07 0:09 
Thanks for the prompt reply.

I'm trying to avoid having to do the following for each hardcoded label:

Label[] lbThisWeek = new Label[10];
for (int i = 0; i < lbThisWeek.Length; i++)
{
lbThisWeek[i] = new Label();
}
lbThisWeek[0] = this.labelThisweek1;
lbThisWeek[1] = this.labelThisweek2;
lbThisWeek[2] = this.labelThisweek3;
lbThisWeek[3] = this.labelThisweek4;
lbThisWeek[4] = this.labelThisweek5;
lbThisWeek[5] = this.labelThisweek6;
lbThisWeek[6] = this.labelThisweek7;
lbThisWeek[7] = this.labelThisweek8;
lbThisWeek[8] = this.labelThisweek9;
lbThisWeek[9] = this.labelThisweek10;

Doing this allows me to use the loop to perform my actions but it seems I have to create separate arrays for each item as I can't see how you pass [i] to a hardcoded control name.

Glen Harvy

AnswerRe: array of type label Pin
Luc Pattyn29-Jun-07 23:57
sitebuilderLuc Pattyn29-Jun-07 23:57 
GeneralRe: array of type label Pin
Glen Harvy30-Jun-07 0:11
Glen Harvy30-Jun-07 0:11 
GeneralRe: no Replace !! Pin
Luc Pattyn30-Jun-07 1:14
sitebuilderLuc Pattyn30-Jun-07 1:14 
AnswerRe: array of type label Pin
Guffa30-Jun-07 0:08
Guffa30-Jun-07 0:08 
Questionconsole application creation Pin
DKalepu29-Jun-07 22:52
DKalepu29-Jun-07 22:52 
AnswerRe: console application creation Pin
Christian Graus29-Jun-07 23:01
protectorChristian Graus29-Jun-07 23:01 
GeneralRe: console application creation Pin
DKalepu30-Jun-07 0:13
DKalepu30-Jun-07 0:13 
GeneralRe: console application creation Pin
Luc Pattyn30-Jun-07 0:55
sitebuilderLuc Pattyn30-Jun-07 0:55 
Questionhow to create mdi? Pin
help as an alias29-Jun-07 22:49
help as an alias29-Jun-07 22:49 
AnswerRe: how to create mdi? Pin
Sathesh Sakthivel29-Jun-07 23:55
Sathesh Sakthivel29-Jun-07 23:55 
GeneralRe: how to create mdi? Pin
Christian Graus30-Jun-07 0:07
protectorChristian Graus30-Jun-07 0:07 
GeneralRe: how to create mdi? Pin
help as an alias30-Jun-07 0:26
help as an alias30-Jun-07 0:26 
GeneralRe: how to create mdi? Pin
help as an alias30-Jun-07 0:34
help as an alias30-Jun-07 0:34 
GeneralRe: How to lock record in web application Pin
dabuskol29-Jun-07 22:42
dabuskol29-Jun-07 22:42 
GeneralRe: How to lock record in web application Pin
Bassam Saoud29-Jun-07 22:49
Bassam Saoud29-Jun-07 22:49 
Questiondatagrid problem Pin
srinivassam29-Jun-07 22:10
srinivassam29-Jun-07 22:10 
QuestionReport Viewer - Find text result to error Pin
aalcantara29-Jun-07 21:52
aalcantara29-Jun-07 21:52 

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.