IList Collection 2
HeyJeg har tideligere stillet et spørgsmål vedrørende collections i C# - http://www.eksperten.dk/spm/341810
Det mit spørgsmål går ud på nu, er hvordan man løber igennem sin collection og udskriver alle værdier.
Min klasse ser såleds ud:
using System;
using System.Collections;
namespace Framework.Data
{
public class NumericValues
{
IList gIListNum = new ArrayList();
public NumericValues()
{
SetValue(10);
SetValue(20);
SetValue(30);
SetValue(40);
SetValue(50);
}
public void SetValue(int aVal)
{
gIListNum.Add(aVal);
}
public IList GetValue()
{
return gIListNum;
}
}
}
