Click here to Skip to main content
15,896,915 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can't make array class data shown in a label Pin
AB777124-Jan-06 16:58
AB777124-Jan-06 16:58 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 20:04
Albert8324-Jan-06 20:04 
GeneralRe: Can't make array class data shown in a label Pin
AB777124-Jan-06 20:54
AB777124-Jan-06 20:54 
GeneralRe: Can't make array class data shown in a label Pin
Guffa23-Jan-06 20:41
Guffa23-Jan-06 20:41 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 9:41
Albert8324-Jan-06 9:41 
AnswerRe: Can't make array class data shown in a label Pin
Garry Stewart23-Jan-06 21:21
Garry Stewart23-Jan-06 21:21 
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 9:51
Albert8324-Jan-06 9:51 
GeneralRe: Can't make array class data shown in a label Pin
Garry Stewart24-Jan-06 12:54
Garry Stewart24-Jan-06 12:54 
Simply create the array of athletes and do something like this in the form's load event or constructor or in another method that you call from your Main method (i'll get to how to call the form from there in a minute)

this.label1.Text = "";

Athlete[] myArray = new Athelete[3];

for(int i =0; i < myArray.Length;i++)
{
label1.Text += myArray[i].ToString();
}

To call the form from your Main method you simply have to create the object and retain a reference to it by assigning it to a local variable:

Form1 myForm = new Form1();

Application.Run(myForm);

myForm.SomeMethod();
GeneralRe: Can't make array class data shown in a label Pin
Albert8324-Jan-06 19:32
Albert8324-Jan-06 19:32 
GeneralPlease disregard the previous exception in the previous message Pin
Albert8324-Jan-06 20:01
Albert8324-Jan-06 20:01 
GeneralRe: Please disregard the previous exception in the previous message Pin
Garry Stewart24-Jan-06 21:07
Garry Stewart24-Jan-06 21:07 
GeneralRe: Please disregard the previous exception in the previous message Pin
Albert8325-Jan-06 15:11
Albert8325-Jan-06 15:11 
GeneralRe: Can't make array class data shown in a label Pin
Albert8325-Jan-06 16:30
Albert8325-Jan-06 16:30 
GeneralRe: Can't make array class data shown in a label Pin
Garry Stewart25-Jan-06 16:39
Garry Stewart25-Jan-06 16:39 
GeneralRe: Can't make array class data shown in a label Pin
Albert8325-Jan-06 16:39
Albert8325-Jan-06 16:39 
GeneralRe: Can't make array class data shown in a label Pin
Albert8325-Jan-06 16:48
Albert8325-Jan-06 16:48 
GeneralRe: Can't make array class data shown in a label Pin
Garry Stewart25-Jan-06 16:59
Garry Stewart25-Jan-06 16:59 
GeneralRe: Can't make array class data shown in a label Pin
Albert8325-Jan-06 17:19
Albert8325-Jan-06 17:19 
Questioncopy Pin
quarinteen23-Jan-06 14:49
quarinteen23-Jan-06 14:49 
AnswerRe: copy Pin
Dave Kreskowiak23-Jan-06 15:32
mveDave Kreskowiak23-Jan-06 15:32 
QuestionPlease Solve with me this network Problem Pin
snouto23-Jan-06 12:50
snouto23-Jan-06 12:50 
AnswerRe: Please Solve with me this network Problem Pin
Dave Kreskowiak23-Jan-06 15:28
mveDave Kreskowiak23-Jan-06 15:28 
AnswerRe: Please Solve with me this network Problem Pin
Garry Stewart23-Jan-06 20:35
Garry Stewart23-Jan-06 20:35 
Questioninvoke codefile from a path embedded in XML? Pin
mattica23-Jan-06 12:19
mattica23-Jan-06 12:19 
AnswerRe: invoke codefile from a path embedded in XML? Pin
snouto23-Jan-06 12:56
snouto23-Jan-06 12:56 

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.