List Info

Thread: Help regrading arrays




Help regrading arrays
user name
2006-07-28 05:48:17
Hi All,

Can anyone please tell me how can I read all the elements of
an array
and then display all the elements at a time.I tried this
using label
but It shows only the last value of the array.
Am I using the right thing?If not..what control should I
use?

Basically I have to do some kind of clustering.Can anyone
please tell
me how can I show my results.

Regards,
Grey.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Help regrading arrays
user name
2006-07-28 11:05:12
try somethign like this.

StringBuilder sb = new StringBuilder();
for(int i =0; i < array.Length-1;i++)
  sb.Append(arry[i]).Append(Environment.Newline);

sb.Append(array[array.Length-1]);

myLabel.Text = sb.ToString();

Dont forget to set the autosize property of the label.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Help regrading arrays
user name
2006-07-28 13:33:34
You are on the right path.
the only change you have to make while changing the text of label is
this.label1.Text+=a[i].ToString();

Note : use += to assign multiple text instances to a single label.

Balaji Birajdar
C# Developer
Pune

On 7/28/06, Garewal <gmail.com">gaurav.garewalgmail.com> wrote:

Hi All,

Can anyone please tell me how can I read all the elements of an array
and then display all the elements at a time.I tried this using label
but It shows only the last value of the array.
Am I using the right thing?If not..what control should I use?

Basically I have to do some kind of clustering.Can anyone please tell
me how can I show my results.

Regards,
Grey.






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Help regrading arrays
user name
2006-07-28 18:49:00
Thanks all for ur time and help...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )