|
-
July 2nd, 2009, 08:56 AM
#3
Re: List of objects
Actually, this is list of objects, defined by the class :
/***********/
class Option
{
public int number;
public Option(int Num)
{
this.number= Num;
}
/*************/
List<Option> options = new List<Option>();
number=1;
do
{
Option option = new Option(number);
options.Add(option);
number++;
} while (number != 5);
foreach (Option o in options)
{
result += "\n" + int.Parse(o.number);
}
MessageBox.Show(result);
/***********************/
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|